/* Original reference pixels provide the artwork, titles, home chip and collection frame. */
.modal-mask:has(.match-reference){padding:0;overflow:hidden;background:#ffebc6;backdrop-filter:none;-webkit-backdrop-filter:none}
.match-reference{position:relative;width:100%;height:100%;max-height:none;flex:none;border:0;border-radius:0;background:#ffebc6;box-shadow:none;animation:none}
.match-reference .mini-head{display:none}
.match-reference .mini-body{position:absolute;inset:0;display:block;overflow:hidden;padding:0!important}
.ref-arena{position:absolute;inset:0;overflow:hidden;background:url('assets/match-reference-clean.webp') center/cover;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.ref-scene{position:absolute;top:0;left:0;width:1280px;height:720px;transform-origin:0 0;background:url('assets/match-reference-clean.webp') 0 0/1280px 720px no-repeat}
.ref-grid{position:absolute;left:194px;top:116px;display:grid;grid-template-columns:repeat(6,94px);grid-template-rows:repeat(6,90px);column-gap:4px;row-gap:2px}
.ref-card{position:relative;display:block;width:94px;height:90px;margin:0;padding:0;border:0;background:none;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.ref-card:focus-visible{outline:3px solid #145e7a;outline-offset:1px;border-radius:12px}
.ref-card:active{scale:.97}
.ref-back,.ref-face{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;backface-visibility:hidden;transition:opacity .15s ease,transform .2s ease}
.ref-back{border-radius:12px;background:url('assets/match-reference.webp') -243px -116px/1280px 720px no-repeat}
.ref-face{inset:3px 4px 5px;border:2px solid #e7b775;border-radius:10px;background:#fff3d6;box-shadow:inset 0 0 0 2px #fff8df,0 3px 1px #b68d5c;opacity:0;transform:scaleX(.7)}
.ref-face.ref-original-face{inset:0;border:0;border-radius:12px;box-shadow:none;background-image:url('assets/match-reference.webp');background-size:1280px 720px;background-repeat:no-repeat}
.ref-card.is-open .ref-back,.ref-card.is-matched .ref-back{opacity:0;transform:scaleX(.7)}
.ref-card.is-open .ref-face,.ref-card.is-matched .ref-face{opacity:1;transform:none}
.ref-icon{display:block;width:73px;height:73px;background-image:url('assets/match-reference-icons.webp');background-size:600% 300%;background-repeat:no-repeat}
.ref-collection{position:absolute;left:860px;top:258px;width:370px;height:212px}
.ref-slot{position:absolute;width:60px;height:62px;background-image:url('assets/match-reference.webp');background-size:1280px 720px;background-repeat:no-repeat}
.ref-slot.ref-original-color:not(.is-collected){filter:sepia(1) saturate(.65);opacity:.43;clip-path:circle(28px at 30px 31px)}
.ref-slot-unlocked{position:absolute;inset:6px 7px 8px;border-radius:50%;background:#ffedc7;display:grid;place-items:center;opacity:0}
.ref-slot-unlocked .ref-icon{width:44px;height:44px}
.ref-slot.is-collected .ref-slot-unlocked{opacity:1}
.ref-step,.ref-count{position:absolute;top:32px;height:32px;display:grid;place-items:center;background:#fff1d5;color:#12546c;font-family:'Microsoft YaHei',sans-serif;font-weight:1000;font-size:26px;line-height:1}
.ref-step{left:1017px;width:30px}.ref-step.many{font-size:19px}
.ref-count{left:1180px;width:61px;font-size:25px}
.ref-home{position:absolute;left:808px;top:23px;width:109px;height:51px;margin:0;padding:0;border:0;border-radius:27px;background:transparent;cursor:pointer;touch-action:manipulation}
.ref-home:focus-visible{outline:3px solid #fff8dc;outline-offset:3px}
.ref-home:active{background:#fff4}
.ref-feedback{display:none}
@media(prefers-reduced-motion:reduce){.ref-back,.ref-face{transition:none}}
