/* Picture-led Match: one stable header and a board that fits the available space. */
html body.ui2 dialog#modal.arcade-inline[data-inline-game="match"]{width:min(620px,calc(100vw - 24px))!important;height:min(600px,calc(100dvh - 24px))!important;max-height:calc(100dvh - 24px)!important;grid-template-rows:48px minmax(0,1fr)!important}
html body.ui2 #modal[data-inline-game="match"]>.arcade-inline-header{display:flex!important;flex-flow:row nowrap!important;justify-content:flex-end!important;align-items:center!important;padding:6px 12px!important;gap:10px!important;min-height:0!important}
#modal[data-inline-game="match"] h2,.match-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
html body.ui2 #modal[data-inline-game="match"] .arcade-popup-hear[hidden]{display:none!important}
html body.ui2 #modal[data-inline-game="match"] .hunter-job{display:grid!important;width:100%!important;height:100%!important;align-items:center!important;justify-items:center!important}
html body.ui2 #modal[data-inline-game="match"] .match-picture-cue{height:100%;min-height:0;display:grid;place-items:center}
html body.ui2 #modal[data-inline-game="match"] .mission-picture{width:auto!important;max-width:100%!important;height:100%!important;max-height:76px!important;object-fit:contain!important;margin:0!important}
html body.ui2 #modal[data-inline-game="match"] .hunter-job-target{height:100%;width:100%;display:grid;place-items:center;min-height:0}
html body.ui2 #modal[data-inline-game="match"] .hunter-job-stars{display:flex;align-items:center;justify-content:center;font-size:0!important}
.match-dot{display:block;width:16px;height:16px;border:3px solid #8870a0;border-radius:50%}
html body.ui2 #modal[data-inline-game="match"] .hunter-job-stars img{width:28px!important;height:28px!important}
html body.ui2 #modal[data-inline-game="match"] .hunter-match-choices{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;min-height:0}
html body.ui2 #modal[data-inline-game="match"] .little-toy{width:100%!important;display:grid!important;place-items:center;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
html body.ui2 #modal[data-inline-game="match"] .little-toy .toy{width:100%;height:auto;aspect-ratio:1;max-width:150px;max-height:150px;object-fit:contain}
html body.ui2 #modal[data-inline-game="match"] .modal-actions{display:flex!important;justify-content:center;gap:24px;width:100%}
html body.ui2 #modal[data-inline-game="match"] .modal-actions button{width:88px;min-height:70px}

/* Every sprite stays in its own slot; the help action has an explicit row. */
html body.ui2 dialog#modal[data-inline-game="match"]>.arcade-inline-content{padding:8px 16px 16px!important;overflow:hidden!important}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:44px min(190px,34cqh) 40px min(150px,28cqw) 52px!important;gap:10px!important;min-height:0!important;align-content:center!important}
html body.ui2 dialog#modal[data-inline-game="match"] .match-picture-cue{grid-column:1!important;grid-row:1!important;width:100%;overflow:hidden}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-target{grid-column:1!important;grid-row:2!important;height:100%!important;overflow:hidden}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-target>.toy{width:min(190px,30cqh)!important;height:min(190px,30cqh)!important;max-width:100%!important;max-height:100%!important;margin:0!important}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-stars{grid-column:1!important;grid-row:3!important;width:100%!important;height:40px!important;margin:0!important;gap:10px!important;overflow:hidden!important;letter-spacing:0!important}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-stars>.toy{display:block!important;position:relative!important;flex:0 0 28px!important;width:28px!important;height:28px!important;min-width:0!important;min-height:0!important;max-width:28px!important;max-height:28px!important;margin:0!important;transform:none!important;overflow:hidden!important;contain:strict}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-stars>.match-dot{flex:0 0 14px!important;width:14px!important;height:14px!important;background:transparent;border:2px solid #b4a1bd!important;border-radius:50%!important;box-sizing:border-box}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-match-choices{grid-column:1!important;grid-row:4!important;height:100%!important;gap:12px!important;min-height:0!important}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-match-choices>.little-toy{height:100%!important;min-height:0!important;min-width:0!important;overflow:hidden!important;padding:10px!important;border-radius:22px!important}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-match-choices>.little-toy>.toy{width:min(100%,130px)!important;height:auto!important;max-height:130px!important;max-width:130px!important;aspect-ratio:1!important;margin:0!important;min-height:0!important}
html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job>.mh-demo{grid-column:1!important;grid-row:5!important;align-self:center!important;margin:0!important;padding:0!important}
@media(max-height:650px){html body.ui2 dialog#modal.arcade-inline[data-inline-game="match"]{grid-template-rows:44px minmax(0,1fr)!important}html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job{grid-template-rows:32px min(150px,32cqh) 28px min(116px,27cqw) 44px!important;gap:6px!important}html body.ui2 dialog#modal[data-inline-game="match"] .mh-demo button{height:44px!important;min-height:44px!important;width:48px!important;min-width:48px!important}html body.ui2 dialog#modal[data-inline-game="match"] .mh-demo button>img{max-height:36px}}
@media(max-height:480px) and (min-width:600px){html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)!important;grid-template-rows:32px minmax(60px,1fr) 32px 44px!important;gap:8px 16px!important}html body.ui2 dialog#modal[data-inline-game="match"] .hunter-match-choices{grid-column:2!important;grid-row:1/4!important}html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job>.mh-demo{grid-column:2!important;grid-row:4!important}html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-target>.toy{width:min(140px,44cqh)!important;height:min(140px,44cqh)!important}html body.ui2 dialog#modal[data-inline-game="match"] .hunter-match-choices>.little-toy{height:auto!important;aspect-ratio:1!important;align-self:center!important}}

html body.ui2 dialog#modal[data-inline-game="match"] .hunter-job-stars>.match-done{background:#a5dfc5!important;border-color:#7bbca2!important}
html body.ui2 dialog#modal[data-inline-game="match"] .match-picture-cue>.mission-picture{display:block!important;width:90px!important;height:100%!important;max-width:100%!important;max-height:44px!important;min-height:0!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important;object-fit:contain!important}
