/* Gacha: approved illustrations, a deliberate control column and a full scene. */
body .gacha-frame>.gacha-experience-main{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,.75fr);grid-template-rows:minmax(0,1fr);gap:0;padding:0 14px 14px;overflow:hidden}
.gacha-hero{position:relative;min-width:0;min-height:0;overflow:hidden;background:#080f1b;isolation:isolate;border:1px solid #af977448;border-right:0}
.gacha-hero-art{position:absolute;inset:0;overflow:hidden;background:#0d1625}
.gacha-featured-slide{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .85s ease,visibility .85s;pointer-events:none}
.gacha-featured-slide.is-active{opacity:1;visibility:visible}
.gacha-featured-slide::after{content:"";position:absolute;z-index:2;inset:0;background:linear-gradient(0deg,#080e19 1%,#080e19f0 13%,#080e199c 31%,transparent 61%);pointer-events:none}
.gacha-featured-slide::before{content:"";position:absolute;z-index:1;inset:0;background:radial-gradient(ellipse at 32% 4%,var(--featured-light),transparent 66%);opacity:.15;mix-blend-mode:screen;pointer-events:none}
.gacha-featured-art{position:absolute;margin:0;top:0;bottom:0;overflow:hidden}
.gacha-featured-secret{left:0;width:61%;z-index:1;mask-image:linear-gradient(90deg,#000 90%,transparent)}
.gacha-featured-alt{left:55%;right:0;bottom:8%;z-index:0}
.gacha-featured-art img{width:100%;height:100%;display:block;object-fit:cover;transform:scale(var(--art-scale));animation:featured-breathe 18s -4s ease-in-out infinite alternate;animation-play-state:paused}
.is-active .gacha-featured-art img{animation-play-state:running}
.gacha-featured-alt img{animation-direction:alternate-reverse}
.gacha-featured-art figcaption{position:absolute;top:22px;left:22px;padding:5px 10px;background:#101522d1;border:1px solid #e6d9b65e;color:#fff4d8;font:600 12px/1.2 system-ui;letter-spacing:.12em}
.gacha-featured-alt figcaption{left:auto;right:22px}
.gacha-hero-copy{position:absolute;left:4%;bottom:22%;right:4%;z-index:3;color:#fff7e5;text-shadow:0 2px 12px #02050c,0 1px 3px #02050c}
.gacha-hero-copy>span{font-size:14px;letter-spacing:.2em;color:#f1d49d}
.gacha-hero-copy h2{font:600 clamp(28px,3vw,54px)/1.35 "Yu Mincho","Noto Serif JP",serif;letter-spacing:.08em;margin:8px 0 4px}
.gacha-hero-copy p{font-size:15px;letter-spacing:.06em;color:#e8dbc4;margin:6px 0 0;line-height:1.6}
.gacha-featured-thumbs{position:absolute;bottom:5%;left:4%;right:4%;z-index:3;display:flex;gap:9px;height:12%;max-height:94px;min-height:44px}
.gacha-featured-thumbs button{flex:1;max-width:85px;min-width:0;overflow:hidden;border:1px solid #e7d2a778;border-radius:2px;background:#0a1522;padding:0;opacity:.72;transition:opacity .3s,border-color .3s}
.gacha-featured-thumbs button[aria-pressed=true]{border-color:#fff0bb;box-shadow:0 0 0 1px #fff0bb,0 0 18px #dddfff33;opacity:1}
.gacha-featured-thumbs img{width:100%;height:100%;object-fit:cover;display:block}
.gacha-featured-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.gacha-featured-thumbs button:focus-visible{outline:2px solid #fff4c3;outline-offset:3px}
body .gacha-pull-panel.experience-control{grid-column:auto;grid-row:auto;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:clamp(8px,1.8vh,22px);padding:clamp(18px,3vw,54px);min-height:0;border:1px solid #ad946250;border-radius:0;background:linear-gradient(135deg,#14212f,#080f1b 78%);overflow:hidden}
.experience-control-heading>span{color:#d4be8d;font-size:14px;letter-spacing:.2em}
.experience-control-heading h2{font:600 clamp(24px,2.25vw,40px)/1.25 "Yu Mincho",serif;color:#fff2d5;margin:8px 0 4px;letter-spacing:.12em}
body .experience-control .gacha-balance-tile{display:flex;align-items:center;justify-content:space-between;gap:12px;background:none;padding:14px 0;border:0;border-bottom:1px solid #c6ad6f3c;min-height:0;border-radius:0}
body .experience-control .gacha-balance-tile span{font-size:14px;color:#c8d1de}
body .experience-control .gacha-balance-tile strong{font:600 clamp(28px,3vw,48px)/1.1 Georgia,serif;color:#ffe3a0}
body .experience-control .gacha-count-presets{display:flex;gap:8px;align-self:stretch;grid-column:auto;grid-row:auto}
body .experience-control .gacha-count-presets button{flex:1;min-height:44px;border-radius:3px;font-size:16px;background:#0d1927;color:#d1d9e6;border:1px solid #61708299}
body .experience-control .gacha-count-presets button[aria-pressed=true]{color:#fff0c8;background:#483c25;border-color:#d3b36a;box-shadow:inset 0 0 24px #f7d38112}
body .experience-control .gacha-pull-count{display:flex;align-self:center;align-items:center;justify-content:center;gap:24px;grid-column:auto;grid-row:auto;margin:0}
body .experience-control .gacha-pull-count button{width:38px;height:38px;min-height:38px;font-size:24px;border-radius:50%}
body .experience-control .gacha-pull-count output{min-width:44px;text-align:center;font-size:28px;color:#f5ebcf}
body .experience-control .gacha-cost{display:flex;align-items:center;justify-content:space-between;gap:10px;grid-column:auto;grid-row:auto;min-height:26px}
body .experience-control .gacha-cost span{font-size:14px;color:#c8d1de}
body .experience-control .gacha-cost strong{font-size:26px;color:#f9dda0}
body .experience-control .gacha-pull-button{align-self:stretch;flex-shrink:0;min-height:54px;grid-column:auto;grid-row:auto;width:100%;border-radius:3px;border:1px solid #ffdf9b;background:linear-gradient(115deg,#fff0b6,#c99a45);color:#20180b;font-size:22px;box-shadow:inset 0 1px #fffce6,0 8px 25px #b88a372b}
body .experience-control .gacha-pull-button:disabled{opacity:.42;box-shadow:none}
.gacha-pull-note{font-size:12px;color:#a8b4c4;margin:0;text-align:center}
body .gacha-rates-link{font-size:14px;color:#ddc68d;text-decoration:underline;text-underline-offset:4px;border:0;background:none;padding:2px;min-height:26px}
.gacha-resource-summary{display:flex;justify-content:center;gap:16px;border-top:1px solid #c6ad6f2e;padding-top:12px;color:#aebac9;font-size:12px}
body .experience-control .gacha-insufficient{margin:0;font-size:12px;text-align:center;color:#ffc598}
.gacha-cinema-host{position:absolute;inset:0;background:#02050b}
body .gacha-player-screen.is-cinema{inset:0!important;z-index:12000!important;height:100dvh!important;max-height:100dvh!important;padding:0}
.gacha-cinema{position:relative;isolation:isolate;width:100%;height:100%;overflow:hidden;color:#fff6dd;background:#02050b}
.gacha-cinema-canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.cinema-header{position:absolute;z-index:5;top:max(12px,env(safe-area-inset-top));left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right));display:flex;align-items:center;gap:18px;padding-bottom:10px;border-bottom:1px solid #a9946033}
.cinema-header h1{font:600 18px/1.3 "Yu Mincho",serif;letter-spacing:.15em;margin:0}
.cinema-progress{margin-left:auto;color:#b8c3d3;font-size:14px;letter-spacing:.12em}
body .cinema-skip,body .cinema-open-all,body .cinema-next{font:600 14px/1.3 system-ui,sans-serif;padding:10px 22px;border:1px solid #b9a47780;border-radius:3px;background:#0c1525df;color:#e6d7b4;min-height:40px;cursor:pointer}
body .cinema-next{min-width:124px;border-color:#e7c684;background:#43351bdf;color:#fff0c9}
body .cinema-next:disabled{opacity:.35;cursor:default}
.cinema-caption{position:absolute;z-index:3;bottom:14%;left:20%;right:20%;text-align:center;pointer-events:none;text-shadow:0 2px 14px #000,0 2px 6px #000;background:linear-gradient(90deg,transparent,#040b14a0,transparent);padding:10px}
.cinema-caption[hidden]{display:none}
.cinema-rarity{font:700 18px/1.2 Georgia,serif;color:#eec989;letter-spacing:.18em}
.cinema-name{font:600 clamp(18px,2.1vw,30px)/1.35 "Yu Mincho",serif;letter-spacing:.06em;margin:5px 0}
.cinema-feedback{font-size:14px;color:#d8dce7;margin:4px 0}
.cinema-title{font-size:13px;color:#fff1bd;margin:4px 0}
.cinema-title:empty{display:none}
.cinema-caption[data-rarity="4"] .cinema-rarity{color:#f5faff;text-shadow:0 0 18px #d6ecff,0 0 30px #d9bdff}
.cinema-tray{position:absolute;bottom:9.7%;left:26%;right:26%;display:none;justify-content:center;gap:7px;z-index:4}
.cinema-multi .cinema-tray{display:flex}
.cinema-multi .cinema-caption{bottom:17%}
.cinema-slot{display:flex;align-items:center;justify-content:center;width:36px;height:44px;max-width:8%;font:600 12px/1 Georgia,serif;color:#8393a5;border:1px solid #596b7b5c;background:#0c1724;box-shadow:inset 0 0 0 3px #030b14;transform:perspective(150px) rotateY(-12deg)}
.cinema-slot.current{border-color:#efd28e;transform:translateY(-4px);box-shadow:0 0 16px #edce7833,inset 0 0 0 3px #172533}
.cinema-slot.opened{color:#e8d3a2;background:#18313c;transform:none}
.cinema-slot[data-rarity="3"]{color:#ffe7ad;border-color:#d3ac56;background:#45361a}
.cinema-slot[data-rarity="4"]{color:#fcfaff;border-color:#effcff;background:#484860;box-shadow:0 0 14px #decdff55}
.cinema-footer{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right));display:flex;align-items:center;gap:12px;z-index:5}
.cinema-phase{visibility:hidden;margin-right:auto;font-size:14px;color:#c5c7d4;letter-spacing:.09em}
.cinema-fallback-card{display:none}
.cinema-fallback .cinema-fallback-card{position:absolute;display:block;inset:15% 36% 28%}
.cinema-fallback-card>.gacha-preview{width:100%;height:100%}
@keyframes featured-breathe{from{transform:scale(calc(var(--art-scale)*1.002))}to{transform:scale(calc(var(--art-scale)*1.014))}}
.motion-hidden .gacha-featured-art img{animation-play-state:paused}
@media(max-height:600px) and (orientation:landscape){
 body .gacha-frame>.gacha-experience-main{grid-template-columns:minmax(0,1fr) minmax(284px,.95fr);padding:0 8px 6px}
 body .gacha-pull-panel.experience-control{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto auto auto;gap:5px 12px;padding:10px 14px;align-content:center}
 .experience-control-heading{grid-column:1}.experience-control-heading>span{font-size:10px;letter-spacing:.08em}.experience-control-heading h2{font-size:20px;margin:3px 0}
 body .experience-control .gacha-balance-tile{grid-column:2;grid-row:1;padding:2px 0;gap:5px;align-items:flex-start;flex-direction:column;justify-content:center}
 body .experience-control .gacha-balance-tile span{font-size:11px}body .experience-control .gacha-balance-tile strong{font-size:26px}
 body .experience-control .gacha-count-presets{grid-column:1;grid-row:2;gap:5px}body .experience-control .gacha-count-presets button{min-height:34px;padding:3px 8px;font-size:14px}
 body .experience-control .gacha-pull-count{grid-column:2;grid-row:2;gap:8px}body .experience-control .gacha-pull-count button{width:30px;height:30px;min-height:30px;min-width:30px;font-size:19px}body .experience-control .gacha-pull-count output{font-size:21px;min-width:23px}
 body .experience-control .gacha-cost{grid-column:1;grid-row:3;gap:4px}body .experience-control .gacha-cost span{font-size:11px}body .experience-control .gacha-cost strong{font-size:23px}
 body .experience-control .gacha-pull-button{grid-column:2;grid-row:3;min-height:38px;font-size:17px;padding:5px}
 .gacha-pull-note{grid-column:1/-1;grid-row:4;font-size:11px}body .gacha-rates-link{grid-column:1;grid-row:5;font-size:12px;padding:0}
 .gacha-resource-summary{grid-column:2;grid-row:5;gap:7px;font-size:10px;border:0;padding:0;align-self:center;flex-wrap:wrap}
 body .experience-control .gacha-insufficient{grid-column:1/-1;grid-row:6;font-size:11px}
 .gacha-featured-secret{width:63%}.gacha-featured-alt{left:57%;bottom:12%}
 .gacha-featured-art figcaption{top:8px;left:8px;padding:3px 5px;font-size:10px}.gacha-featured-alt figcaption{left:auto;right:8px}
 .gacha-featured-thumbs{right:6%}
 .gacha-hero-copy{bottom:29%;left:6%}.gacha-hero-copy>span{font-size:10px;letter-spacing:.08em}.gacha-hero-copy h2{font-size:26px;margin:5px 0;letter-spacing:.02em}.gacha-hero-copy p{font-size:12px}
 .gacha-featured-thumbs{height:18%;min-height:30px;gap:5px;bottom:5%}
 .cinema-header{top:8px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));padding-bottom:5px;gap:8px}.cinema-header h1{font-size:14px}.cinema-progress{font-size:12px}
 body .cinema-skip,body .cinema-open-all,body .cinema-next{min-height:30px;padding:5px 12px;font-size:12px}.cinema-footer{bottom:8px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));gap:7px}.cinema-phase{font-size:11px}
 .cinema-caption{left:62%;right:4%;bottom:30%;padding:8px}.cinema-multi .cinema-caption{bottom:31%}.cinema-name{font-size:17px;letter-spacing:0}.cinema-rarity{font-size:15px}.cinema-feedback,.cinema-title{font-size:11px}
 .cinema-tray{left:28%;right:28%;bottom:13%;gap:4px}.cinema-slot{height:24px;width:25px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){.gacha-hero-art>img{animation:none}.cinema-slot{transform:none!important}}

/* Shared canonical card browser and direct per-card appearance editing. */
body .cosmetic-card-browser{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;padding:12px 22px;overflow:hidden}
.cosmetic-card-browser .dense-toolbar{display:flex;align-items:center;gap:8px;min-width:0}
.cosmetic-card-browser input{flex:1;min-width:100px;font-size:14px;min-height:36px;background:#0c1824;color:#e7edf5;border:1px solid #566673;border-radius:4px;padding:6px 10px}
.cosmetic-card-browser select{font-size:14px;min-height:36px;padding:4px 8px}
.cosmetic-card-grid{display:grid;min-height:0;gap:10px;overflow:hidden}
.cosmetic-card-grid.dense-grid{grid-template-columns:repeat(var(--dense-columns,6),minmax(0,1fr));grid-template-rows:repeat(var(--dense-rows,2),minmax(0,1fr))}
body .cosmetic-card-tile{display:grid;grid-template-rows:minmax(0,1fr) 23px 18px 17px;gap:2px;min-width:0;min-height:0;padding:5px;text-align:left;border-radius:4px;background:linear-gradient(#152535,#08111d);border:1px solid #687c9166;overflow:hidden}
body .cosmetic-card-tile[hidden]{display:none}
.cosmetic-card-tile>strong{color:#f5e7c8;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:23px}
.cosmetic-card-tile>small,.cosmetic-grid-equipped{font-size:11px;line-height:17px;color:#a9bac8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cosmetic-grid-equipped{color:#d8c695}
.cosmetic-grid-art{position:relative;display:block;min-height:0;overflow:hidden;background:#050b12}
.cosmetic-grid-art img{width:100%;height:100%;display:block;object-fit:cover;object-position:center 25%}
.cosmetic-grid-cost{position:absolute;top:5px;left:5px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#07111fe8;border:1px solid #dfca8c;font:600 20px/1 Georgia;color:#fff3c7}
.cosmetic-grid-attr{position:absolute;right:4px;bottom:4px;padding:2px 4px;background:#07111fde;color:#f4e4bb;font-size:11px}
.cosmetic-card-heading{grid-column:1/-1;display:flex;align-items:center;gap:14px;min-width:0}
.cosmetic-card-heading h2{font:600 22px/1.3 "Yu Mincho",serif;margin:0;color:#f5e7c6;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cosmetic-card-heading small{margin-left:auto;color:#b5c3ce;font-size:12px}
.cosmetic-card-back{flex-shrink:0}
.cosmetic-art-choice.is-locked{opacity:.52}
body .card-pool-detail .card-pool-customize{position:absolute;right:12px;top:12px;z-index:4;min-height:38px;font-size:14px;padding:6px 14px;border:1px solid #d2b470;background:#30291df5;color:#f8e7b7;border-radius:4px}
body .gacha-result-grid:has(>.gacha-result-card:only-child){display:flex;justify-content:center}
body .gacha-result-grid>.gacha-result-card:only-child{width:min(300px,100%);flex:none}
body .gacha-frame>.gacha-result-screen{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;padding:8px 12px;overflow:hidden}
body .gacha-result-heading{display:flex;align-items:baseline;justify-content:center;gap:16px;padding:0;min-height:28px}
body .gacha-result-heading h2{font-size:24px;margin:0}
body .gacha-result-heading p{font-size:13px}
body .gacha-result-heading>span{display:none}
body .gacha-result-grid{min-height:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px;overflow:hidden}
body .gacha-result-card{position:relative;min-height:0;display:grid;grid-template-rows:20px minmax(0,1fr) auto auto auto;align-content:stretch;gap:5px;padding:8px;border-radius:5px;box-shadow:none;overflow:hidden}
body .gacha-result-card>.gacha-preview{min-height:0;height:100%;max-height:100%;aspect-ratio:auto;margin:0;overflow:hidden}
body .gacha-result-card .gacha-preview img{object-fit:contain}
body .gacha-result-card .gacha-preview-mark{display:none}
body .gacha-result-card h3{font-size:13px;line-height:1.3}
body .gacha-result-card>strong{font-size:11px;line-height:1.3}
body .gacha-result-card>.title-unlock-notice{margin:0;font-size:10px;line-height:1.2}
body .gacha-result-actions{padding:0;gap:10px;flex-wrap:nowrap}
body .gacha-result-actions button{min-height:38px;padding:6px 18px;font-size:14px}
@media(max-height:600px) and (orientation:landscape){
 body .gacha-frame>.gacha-result-screen{gap:5px;padding:4px 8px 6px}
 body .gacha-result-heading{min-height:20px;gap:12px}
 body .gacha-result-heading h2{font-size:17px}body .gacha-result-heading p{font-size:11px}
 body .gacha-result-grid{gap:5px}
 body .gacha-result-card{grid-template-columns:38% minmax(0,1fr);grid-template-rows:16px minmax(0,1fr) auto auto;gap:3px;padding:5px}
 body .gacha-result-card>.gacha-preview{grid-column:1;grid-row:1/3;width:100%;padding:2px}
 body .gacha-result-card>.gacha-rarity{grid-column:2;grid-row:1;font-size:11px;line-height:14px;padding:0 3px;justify-self:start;min-height:0}
 body .gacha-result-card h3{grid-column:2;grid-row:2;font-size:10px;line-height:1.22;align-self:center}
 body .gacha-result-card>strong,body .gacha-result-card>.title-unlock-notice{grid-column:1/-1;font-size:10px;line-height:1.2}
 body .gacha-result-actions button{min-height:36px;font-size:12px;padding:5px 14px}
}
@media(max-height:600px) and (orientation:landscape){
 body .cosmetic-card-browser{padding:5px 12px;gap:5px}
 .cosmetic-card-browser input,.cosmetic-card-browser select{min-height:30px;font-size:12px}
 .cosmetic-card-browser .dense-toolbar{gap:5px}.cosmetic-card-browser .dense-toolbar button{min-height:30px;padding:3px 8px;font-size:12px}
 body .cosmetic-card-tile{grid-template-columns:49px minmax(0,1fr);grid-template-rows:22px 17px 17px;align-content:center;gap:1px 5px;padding:4px}
 .cosmetic-grid-art{grid-column:1;grid-row:1/4;height:100%;min-height:52px}.cosmetic-card-tile>strong,.cosmetic-card-tile>small,.cosmetic-grid-equipped{grid-column:2}.cosmetic-card-tile>strong{font-size:12px}.cosmetic-card-tile>small,.cosmetic-grid-equipped{font-size:10px}.cosmetic-grid-cost{width:19px;height:19px;font-size:14px;top:1px;left:1px}.cosmetic-grid-attr{display:none}
 .cosmetic-card-heading{gap:8px}.cosmetic-card-heading h2{font-size:17px}.cosmetic-card-heading small{font-size:10px}body .cosmetic-card-heading button{min-height:28px;height:28px;padding:4px 8px;font-size:12px}
 body .card-pool-detail .card-pool-customize{top:6px;right:8px;min-height:30px;padding:4px 10px;font-size:12px}
}

@media(prefers-reduced-motion:reduce){.gacha-featured-slide,.gacha-featured-art img{transition:none}.gacha-featured-art img,.is-active .gacha-featured-art img{animation:none;transform:scale(var(--art-scale))}}

/* PR98: a preview is a bounded stage, never an instruction to stretch its object. */
body .gacha-result-card>.gacha-preview{display:grid;place-items:center;width:100%;box-sizing:border-box;align-self:stretch}
body .gacha-result-card .gacha-preview>img:not(.material-item-icon){position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform:none}
body .gacha-result-card .gacha-preview>.star2-visual{position:absolute;inset:0;width:100%;height:100%}
body .gacha-result-card .preview-deploy_effect{container-type:size}
body .gacha-result-card .deploy-effect-visual :is(b,small){display:none}
body .gacha-result-card .deploy-effect-visual i{font-size:min(35cqw,35cqh)}
body .gacha-preview.preview-resource{container-type:size;display:grid;place-items:center;padding:0}
body .gacha-preview.preview-resource>b{display:none}
body .material-item-icon{display:inline-block;width:24px;height:24px;min-width:24px;object-fit:contain;vertical-align:middle;flex:none;border:0;border-radius:0;background:none;box-shadow:none;transform:none}
body .gacha-preview.preview-resource>.material-item-icon{position:absolute;left:50%;top:50%;width:min(88cqw,88cqh);height:min(88cqw,88cqh);min-width:0;max-width:100%;max-height:100%;transform:translate(-50%,-50%);object-fit:contain}
body .item-box-card>.item-box-material{width:clamp(64px,9vw,112px);height:clamp(64px,9vw,112px);margin:0 auto;grid-column:1/-1;justify-self:center}
body .gacha-resource-summary>span{display:inline-flex;align-items:center;gap:3px}
body .gacha-resource-summary .material-item-icon{width:22px;height:22px;min-width:22px}
body .gacha-result-card>strong .material-item-icon{width:18px;height:18px;min-width:18px;margin-right:3px}
body .gacha-balance-tile:has(>.material-item-icon){grid-template-columns:28px 1fr auto;align-items:center}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
 body .gacha-result-card>.gacha-preview{padding:0}
 body .item-box-card>.item-box-material{width:58px;height:58px}
 body .gacha-resource-summary .material-item-icon{width:18px;height:18px;min-width:18px}
}

/* Keep the original ★4 / ★3 full-bleed card scene. The corresponding skin
   stands in the same scene, without a separate panel or empty skin background. */
.gacha-skin-preview{display:grid;grid-template-rows:minmax(0,1fr) auto auto;gap:4px;min-width:0;min-height:0}
.gacha-skin-art{position:relative;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(ellipse at 50% 75%,#ac9ac72b,transparent 70%)}
.gacha-skin-art .gacha-skin-image{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 5px 10px #0008)}
.gacha-skin-art .gacha-skin-image[hidden]{display:none}
.gacha-skin-status{padding:8px;color:#c9d6e6;font-size:12px;text-align:center;line-height:1.5;margin:0}
.gacha-skin-caption{text-align:center;font-size:12px;color:#e8edf7;line-height:1.4}
.gacha-skin-forms{display:flex;justify-content:center;gap:4px}
body .gacha-skin-forms button{min-height:36px;min-width:58px;padding:5px 14px;border:1px solid #737d91;background:#141e2e;border-radius:4px;color:#dce4f2;font-size:13px;line-height:1.2}
body .gacha-skin-forms button[aria-pressed=true]{border-color:#f2d49a;background:#51402b;color:#ffebc4;box-shadow:inset 0 0 0 1px #d6b67a40}
.gacha-skin-item-badge{display:block;color:#f7d792;background:#4f402733;border:1px solid #c4a46f55;border-radius:3px;padding:4px 6px;font-size:12px;line-height:1.4}
body .gacha-skin-reward-detail{display:flex;flex-direction:column;gap:10px;width:min(760px,calc(100vw - 24px));padding:14px;box-sizing:border-box;max-height:calc(100dvh - 24px)}
body .gacha-skin-reward-detail .gacha-item-detail-close{align-self:flex-end;position:sticky;top:0;z-index:2;min-height:40px;height:auto;background:#172336}
.gacha-skin-reward-bundle{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;flex:0 0 auto;height:clamp(220px,44dvh,390px);min-width:0}
body .gacha-skin-reward-bundle>.gacha-preview{height:100%;width:100%;max-height:none;min-height:0;aspect-ratio:auto;overflow:hidden}
body .gacha-skin-reward-bundle>.gacha-preview>img{object-fit:contain}
body .gacha-skin-reward-detail>:is(h2,p){margin:0;font-size:14px;line-height:1.5}
body .gacha-skin-reward-detail>h2{font-size:21px}
.gacha-skin-reward-summary{padding:9px 12px;border:1px solid #dcc08770;background:#5240284d;color:#ffe6b0;font-size:14px;line-height:1.6}
body .gacha-skin-reward-detail>.gacha-skin-preview-note{font-size:12px;color:#bac9db}
body .gacha-skin-reward-detail>.gacha-detail-actions{flex-wrap:wrap}
.gacha-skin-forms button:focus-visible,.gacha-featured-card-actions button:focus-visible{outline:2px solid #fff0bf;outline-offset:2px}

body .gacha-skin-hero{display:block;padding:0}
.gacha-skin-hero .gacha-featured-secret{width:70%}
.gacha-skin-hero .gacha-featured-alt{left:64%;bottom:0}
.gacha-skin-hero .gacha-featured-slide{pointer-events:none}
.gacha-skin-hero .gacha-featured-slide::after{display:none}
.gacha-skin-hero .gacha-featured-art[hidden]{display:none}
.gacha-skin-hero .gacha-featured-art img{animation:none}
.gacha-skin-foreground{grid-template-rows:auto minmax(0,1fr) auto auto;position:absolute;z-index:3;left:3%;right:auto;top:9%;bottom:39%;width:27%;pointer-events:none}
.gacha-skin-perk{justify-self:center;max-width:100%;padding:3px 8px;border:1px solid #e1c98c99;border-radius:3px;background:#111927e8;color:#ffe5a6;font:600 11px/1.3 system-ui;text-shadow:0 1px 3px #000}
.gacha-skin-foreground .gacha-skin-art{background:none;overflow:visible}
.gacha-skin-foreground .gacha-skin-image{object-position:center bottom;filter:drop-shadow(0 5px 8px #0009) drop-shadow(0 0 1px #ffedbc88)}
.gacha-skin-foreground .gacha-skin-caption{font-size:11px;color:#142031;-webkit-text-stroke:.8px #fff7e5;paint-order:stroke fill;text-shadow:0 1px 1px #fff8}
.gacha-skin-foreground .gacha-skin-forms{pointer-events:auto}
.gacha-skin-foreground .gacha-skin-status{align-self:end;background:#0b1524d9;border:1px solid #bca57466}
.gacha-skin-hero .gacha-hero-copy{right:30%;bottom:19%;z-index:4;background:none;-webkit-text-stroke:1px #142031;paint-order:stroke fill;text-shadow:0 1px 1px #08101dbb}
.gacha-skin-unlock{display:block;color:#f9dda0;font-size:clamp(11px,1.05vw,15px);line-height:1.5;letter-spacing:.02em}
.gacha-skin-hero .gacha-hero-copy h2{font-size:clamp(23px,2.8vw,44px);margin:4px 0;-webkit-text-stroke:1px #142031}
.gacha-skin-hero .gacha-hero-copy .gacha-skin-inclusion{font-size:12px;margin:0;color:#142031;-webkit-text-stroke:.8px #fff7e5;text-shadow:0 1px 1px #fff8}
.gacha-featured-card-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}
body .gacha-featured-card-actions button{border:1px solid #bca57477;background:#0b1422c9;padding:4px 8px;min-height:30px;border-radius:3px;font-size:11px;color:#f3e2bb}
body .gacha-featured-card-actions button[hidden]{display:none}
.gacha-skin-hero .gacha-featured-thumbs{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.gacha-skin-hero .gacha-featured-thumbs button{flex:1 0 44px;min-width:44px}
/* Older landscape detail rules must not place a nested preview on a later row. */
.gacha-skin-reward-bundle{grid-template-rows:minmax(0,1fr)}
body .gacha-skin-reward-bundle>.gacha-preview{grid-column:1;grid-row:1;align-self:stretch}
body .gacha-skin-reward-bundle>.gacha-skin-preview{grid-column:2;grid-row:1;height:100%;align-self:stretch}
@media(max-width:600px) and (orientation:portrait){
 body .gacha-frame>.gacha-experience-main{display:flex;flex-direction:column;overflow-y:auto;padding:4px 8px 10px;gap:0;overscroll-behavior:contain}
 body .gacha-skin-hero{flex:0 0 auto;height:clamp(320px,46dvh,390px);border-right:1px solid #af977448}
 .gacha-skin-hero .gacha-featured-secret{width:70%}
 .gacha-skin-hero .gacha-featured-alt{left:64%}
 .gacha-skin-hero .gacha-featured-art figcaption{top:10px;left:10px;font-size:10px;padding:4px 6px}
 .gacha-skin-hero .gacha-featured-alt figcaption{left:auto;right:10px}
 .gacha-skin-foreground{left:2%;right:auto;top:12%;bottom:43%;width:31%}
 .gacha-skin-foreground .gacha-skin-caption{font-size:9px}
 .gacha-skin-perk{font-size:9px;padding:3px 5px}
 body .gacha-skin-foreground .gacha-skin-forms button{min-width:43px;min-height:34px;padding:4px 6px;font-size:11px}
 .gacha-skin-hero .gacha-hero-copy{left:4%;right:30%;bottom:19%}
 .gacha-skin-hero .gacha-hero-copy h2{font-size:clamp(17px,5vw,22px);line-height:1.3;letter-spacing:0}
 .gacha-skin-hero .gacha-hero-copy .gacha-skin-inclusion{font-size:10px}
 .gacha-skin-unlock{font-size:10px;line-height:1.4}
 .gacha-featured-card-actions{gap:4px;margin-top:4px}
 body .gacha-featured-card-actions button{min-height:27px;padding:3px 5px;font-size:10px}
 .gacha-skin-hero .gacha-featured-thumbs{bottom:4%;height:12%;gap:5px;min-height:38px}
 .gacha-skin-hero .gacha-featured-thumbs button{min-width:33px;flex-basis:33px}
 body .gacha-pull-panel.experience-control{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;padding:12px 16px;overflow:visible}
 .experience-control-heading{grid-column:1}.experience-control-heading>span{font-size:10px}.experience-control-heading h2{font-size:22px;margin:3px 0}
 body .experience-control .gacha-balance-tile{grid-column:2;grid-row:1;padding:0;gap:4px;justify-content:end;flex-wrap:wrap;border:0}
 body .experience-control .gacha-balance-tile span{font-size:11px}body .experience-control .gacha-balance-tile strong{font-size:28px}
 body .experience-control .gacha-count-presets{grid-column:1;grid-row:2}body .experience-control .gacha-count-presets button{min-height:34px;font-size:13px}
 body .experience-control .gacha-pull-count{grid-column:2;grid-row:2;gap:12px}body .experience-control .gacha-pull-count button{width:32px;height:32px;min-height:32px}body .experience-control .gacha-pull-count output{font-size:22px;min-width:24px}
 body .experience-control .gacha-cost{grid-column:1;grid-row:3}body .experience-control .gacha-cost span{font-size:10px}body .experience-control .gacha-cost strong{font-size:23px}
 body .experience-control .gacha-pull-button{grid-column:2;grid-row:3;min-height:42px;font-size:18px}
 .gacha-pull-note{grid-column:1/-1;font-size:10px}body .gacha-rates-link{grid-column:1/-1;font-size:12px}
 .gacha-resource-summary{grid-column:1/-1;padding-top:6px;font-size:10px}
 .gacha-skin-reward-bundle{height:300px;gap:8px}
}
@media(max-height:600px) and (orientation:landscape){
 body .gacha-frame>.gacha-experience-main{grid-template-columns:minmax(0,1.3fr) minmax(284px,.8fr);overflow-y:auto;grid-template-rows:minmax(238px,1fr)}
 .gacha-skin-foreground{left:2%;right:auto;top:17%;bottom:24%;width:27%}
 .gacha-skin-hero .gacha-hero-copy{left:31%;right:30%;bottom:24%}
 .gacha-skin-hero .gacha-hero-copy h2{font-size:16px;line-height:1.2;letter-spacing:0}
 .gacha-skin-unlock{font-size:10px;line-height:1.3}
 .gacha-skin-hero .gacha-hero-copy .gacha-skin-inclusion{font-size:10px}
 .gacha-skin-foreground .gacha-skin-caption{font-size:9px}
 .gacha-skin-perk{font-size:9px;padding:2px 5px}
 body .gacha-skin-foreground .gacha-skin-forms button{min-width:40px;min-height:28px;padding:3px 5px;font-size:10px}
 .gacha-featured-card-actions{gap:3px;margin-top:4px}body .gacha-featured-card-actions button{min-height:25px;padding:2px 4px;font-size:9px}
 .gacha-skin-hero .gacha-featured-thumbs{bottom:4%;height:16%;min-height:30px;gap:4px}
 .gacha-skin-hero .gacha-featured-thumbs button{min-width:33px;flex-basis:33px}
 body .gacha-skin-reward-detail{display:grid;grid-template-columns:minmax(230px,1fr) minmax(0,1fr);gap:6px 12px;max-width:740px}
 body .gacha-skin-reward-detail>.gacha-item-detail-close{grid-column:1/-1;justify-self:end;position:static;min-height:32px}
 .gacha-skin-reward-detail .gacha-skin-reward-bundle{grid-column:1;grid-row:2/10;height:220px;gap:8px}
 body .gacha-skin-reward-detail>:is(h2,p,strong,footer){grid-column:2}
 body .gacha-skin-reward-detail>h2{font-size:18px}
 .gacha-skin-reward-summary{font-size:12px;padding:6px 8px}
}
/* Portrait keeps the same full-bleed background, but foreground rows cannot
   collide when the small-screen copy wraps or the form caption is taller. */
@media(max-width:600px) and (orientation:portrait){
 body .gacha-skin-hero{display:grid;grid-template-rows:minmax(0,1fr) auto 42px;gap:5px;padding:44px 12px 10px;height:clamp(360px,46dvh,390px);box-sizing:border-box}
 .gacha-skin-hero>.gacha-skin-foreground{position:relative;left:auto;right:auto;top:auto;bottom:auto;grid-row:1;width:34%;height:100%;min-height:0}
 .gacha-skin-hero>.gacha-hero-copy{position:relative;left:auto;right:auto;top:auto;bottom:auto;grid-row:2;width:70%;min-width:0}
 .gacha-skin-hero .gacha-hero-copy .gacha-skin-inclusion{font-size:9px;letter-spacing:0;line-height:1.35}
 .gacha-skin-hero>.gacha-featured-thumbs{position:relative;left:auto;right:auto;top:auto;bottom:auto;grid-row:3;width:100%;height:42px;min-height:0;margin:0;align-self:end}
}
