/* Runtime atelier art: the room and the playable case share the cover materials. */
body{background:#c9e6e0 url('assets/atelier-room.webp') center center/cover fixed no-repeat}
body::before{background:linear-gradient(90deg,#f9f6e715,transparent 45%,#eaf6f715)!important;box-shadow:none!important}
/* Solid reading surfaces keep text legible over the illustrated room. */
#game-information{box-sizing:border-box;width:calc(100% - 32px);max-width:1000px;margin:24px auto calc(var(--game-footer-space,68px) + 24px);padding:30px 36px;background:#fff9ed;color:#284e57;border:1px solid #b99a5f;border-radius:20px;box-shadow:0 12px 35px #2d5b5426;font-size:16px;line-height:1.8}
#game-information :is(h1,h2,h3){color:#715121;line-height:1.3;text-shadow:none}
#game-information h2{margin-top:28px;font-size:21px}
#game-information :is(p,li,footer){color:#284e57}
#game-information a{color:#17616c;text-decoration:underline;text-underline-offset:3px}
#game-information{scroll-margin-top:80px}
.bm-menu :is(.bm-note,#bm-mode-copy),.bm-hud :is(.bm-score>span,.bm-score small,.bm-stats span),.bm-dialog .bm-note{color:#425e65}
.bm-menu .bm-kicker,.bm-dialog .bm-kicker{color:#7b5923}
#screen-title #install-start-btn{color:#345d65;border-color:#78999a;background:#fffcf1}
.bm-dialog{color:#244d58;background:#fff9ed}
.bm-dialog h3{color:#795923}
.bm-medal-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}
.bm-dialog button.bm-medal-card{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;padding:12px 8px;border:1px solid #cfb780;border-radius:14px;background:linear-gradient(#fffef7,#f0e6ca);box-shadow:inset 0 0 0 3px #fffdf1,0 3px 6px #73521b12;color:#37545b;text-align:center;transition:transform .15s,box-shadow .15s}
.bm-medal-card:hover{transform:translateY(-3px);box-shadow:0 6px 16px #36584f30!important}
.bm-medal{display:block;width:94px;max-width:100%;height:auto;filter:drop-shadow(0 4px 3px #73521b30)}
.bm-medal-card strong{font-size:12px;line-height:1.35;min-height:33px;display:grid;place-items:center}
.bm-medal-card small{font-size:10px;color:#55615a}
.bm-medal-card.locked .bm-medal{filter:saturate(.45) drop-shadow(0 3px 2px #73521b20);opacity:.85}
.bm-dialog .bm-medal-card.earned{background:linear-gradient(#fff9d8,#f2d991);border-color:#b98830}
.bm-medal-card.earned small{color:#38654c}
.bm-medal-detail{text-align:center;max-width:440px;margin:20px auto 26px;font-size:16px;line-height:1.65}
.bm-medal-detail .bm-medal{width:160px;margin:auto}
.bm-medal-detail progress{display:block;width:100%;height:12px;accent-color:#3a8a78}
.bm-medal-status{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:#80612d;font-weight:800}
@media(max-width:759px),(hover:none) and (pointer:coarse){
  #screen-title.screen{justify-content:flex-start;padding:var(--bm-title-top,68px) 12px calc(var(--game-footer-space,68px) + 18px);gap:16px}
  #screen-title.screen>.game-title-play{width:min(100%,560px)}
  #screen-title.screen .game-title-picture{display:block;width:100%}
  #screen-title.screen .title-logo{display:block;width:100%;max-width:none;max-height:none;height:auto;aspect-ratio:16/9;object-fit:contain;margin:0;border-radius:0;box-shadow:none;filter:drop-shadow(0 8px 10px #33565030)}
  #screen-title .bm-menu{padding:10px 12px}
  #screen-title .bm-menu>.bm-kicker{margin:0 0 6px;font-size:10px;line-height:1.3}
  #screen-title .bm-mode-list{margin:4px 0;gap:5px}
  #screen-title .bm-mode{min-height:52px;padding:6px 2px;font-size:11px;line-height:1.2}
  #screen-title .bm-mode svg{width:18px;height:18px;margin-bottom:3px}
  #screen-title #bm-mode-copy{min-height:0;margin:4px 0;font-size:12px;line-height:1.3}
  #screen-title .bm-menu .game-primary-menu{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;margin:4px auto;width:100%}
  #screen-title .bm-menu :is(#btn-how-to,#btn-start,#install-start-btn){min-height:44px;margin:0 auto;padding:8px 12px}
  #screen-title .bm-menu #btn-how-to{grid-column:1/-1;padding:6px 12px;font-size:13px}
  #screen-title .bm-menu #btn-start{width:100%;max-width:none}
  #screen-title .bm-menu #install-start-btn{font-size:11px;letter-spacing:0;padding:6px 10px;background:none;border-color:transparent;box-shadow:none;text-transform:none}
  #screen-title .bm-menu-actions{margin:6px auto 0;gap:5px}
  #screen-title .bm-menu-actions button{min-height:44px;padding:6px 9px;font-size:11px}
  #screen-title .bm-menu>.bm-note{margin:5px 0 0;font-size:10px;line-height:1.3}
  #screen-title .bm-menu>.bm-note:not(#bm-profile):not([data-personal-scores]){display:none}
  #game-information{padding:22px 20px;width:calc(100% - 24px);font-size:15px}
  .bm-medal-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .bm-dialog{padding:20px 14px}
}
@media(max-width:350px){.bm-medal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
#bm-play{background:none}
#bm-console,#bm-canvas{background:transparent;box-shadow:none}
.bm-hud,.bm-menu,.bm-dialog,.pause-card{
  background:#fff8e9 url('assets/ivory-marble.webp') center/420px;
  border:1px solid #c2a363;
  box-shadow:0 18px 40px #2e5f5630,inset 0 0 0 3px #fff6d7,inset 0 0 0 4px #c5a5676b;
  border-radius:18px;
}
.bm-hud{width:300px;padding:22px;box-sizing:border-box;overflow:visible}
.bm-menu{padding:20px;box-sizing:border-box}
.bm-brandline{color:#816129;letter-spacing:.08em}
.bm-score{border-color:#b296594d}
.bm-score>strong{color:#194b59;text-shadow:0 2px #fffdf1}
.bm-harmony{background:#f8efd6!important;border-color:#b7924c;box-shadow:inset 0 1px #fff}
.bm-harmony:after{background:#faf3e0;color:#ad883a}
#bm-objective,#bm-tip{color:#345963}
#bm-feedback{color:#346d6c}
.bm-play-actions button,.bm-menu-actions button,.bm-mode,.bm-dialog button{
  background:linear-gradient(#fffdf2,#ecdfb7);border-color:#bda069;color:#234e59;
  box-shadow:inset 0 1px #fffdf4,0 2px 2px #75551d18;
}
.bm-mode.active{background:linear-gradient(#d8ede4,#a0cbc4);border-color:#477f7c;color:#154f59;box-shadow:inset 0 1px #f6fff6,0 2px 4px #265f5d2b}
#screen-result.screen{max-width:760px;background:none!important;box-shadow:none;padding:76px 18px calc(var(--game-footer-height,57px) + 26px);box-sizing:border-box;min-height:100dvh}
.bm-result{
  width:100%;max-width:590px;padding:26px 28px;
  box-sizing:border-box;background:#fff7e7 url('assets/ivory-marble.webp') center/420px;
  border:18px solid #c9a25c;
  border-image:url('assets/jewel-case.webp') 85 stretch;
  box-shadow:0 22px 65px #123e4c45;
  color:#234e59;
}
.bm-result-gem{font-size:0;width:92px;height:92px;margin:6px auto 10px;background:url('icon-192.png') center/contain no-repeat;filter:drop-shadow(0 7px 6px #345e4c38)}
#bm-result-heading{color:#8c662b;font-size:13px;letter-spacing:.14em}
#bm-result-score{font-size:76px;line-height:1.08;color:#215563;font-weight:800;text-shadow:0 2px #fffef5}
#bm-result-stats{gap:10px;justify-content:space-around;flex-wrap:wrap;margin-top:12px;padding:18px 0;border-block:1px solid #c6aa6c66;font-size:11px}
#bm-result-stats>div{min-width:58px}
#bm-result-stats strong{font-size:25px;color:#245d65}
#bm-result-affinity{margin-top:18px}
#bm-result-credit{font-size:13px;color:#48616a}
.bm-result .btn{display:block;width:min(100%,340px);margin:10px auto;background:linear-gradient(#fffcf0,#ead9ac);border-color:#b99b62;box-shadow:inset 0 1px #fffdf2,0 3px #997b3d33;color:#244f5b}
.bm-result .btn[hidden]{display:none!important}
.bm-result #bm-again,.bm-result #bm-next{background:linear-gradient(#fff0ad,#edbd4d);border-color:#b28632;color:#554015;box-shadow:inset 0 1px #fff7cc,0 3px #a1792b}
.bm-result>.bm-note:last-of-type{margin-bottom:0}
.pause-overlay{background:#e4f0e499!important;backdrop-filter:blur(5px)}
.pause-card{padding:26px}
.bm-dialog{border-radius:14px}
@media(max-width:759px),(hover:none) and (pointer:coarse){
  body{background-position:46% center}
  .bm-hud{width:min(100%,520px);padding:6px 10px;border-radius:12px;box-shadow:0 5px 16px #2e5f5620,inset 0 0 0 2px #fff4d5}
  .bm-menu{padding:10px 12px}
  #bm-skip{right:12px;top:6px}
  #screen-result.screen{padding:64px 12px calc(var(--game-footer-height,57px) + 16px)}
  .bm-result{padding:20px 12px;border-width:13px}
  .bm-result-gem{width:74px;height:74px}
  #bm-result-score{font-size:58px}
  #bm-result-heading{font-size:11px}
  #bm-result-stats{gap:8px;font-size:10px;padding:12px 0}
  #bm-result-stats strong{font-size:23px}
}
@media(max-height:500px) and (min-width:600px){.bm-hud{width:244px;padding:12px}.bm-result{margin:12px auto}#screen-result.screen{padding-top:60px}.bm-result-gem{width:60px;height:60px}}
.bm-toast.bm-reward{display:flex;align-items:center;gap:14px;top:76px;bottom:auto;width:max-content;max-width:calc(100vw - 32px);box-sizing:border-box;padding:16px 24px 16px 12px;background:linear-gradient(135deg,#fff9df,#fae9aa 65%,#e2bd65);border:2px solid #bf8d33;border-radius:14px;color:#59401a;font-size:16px;font-weight:800;box-shadow:0 10px 35px #32565140,inset 0 0 0 3px #fff8df;animation:bm-reward-arrive .55s cubic-bezier(.18,.85,.3,1.15) both;pointer-events:none}
.bm-toast.bm-reward[hidden]{display:none}
.bm-reward-jewel{width:60px;height:60px;flex:0 0 60px;background:url('icon-192.png') center/contain no-repeat;filter:drop-shadow(0 0 9px #fffcdb);animation:bm-reward-jewel 1.5s ease-in-out 2}
.bm-star-earned{display:inline-block;color:#e6ad25;text-shadow:0 2px #91651a,0 0 12px #ffdf7c;animation:bm-star-arrive .65s var(--star-delay) both}
.bm-bomb{touch-action:none;min-width:110px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:6px 10px;border:1px solid #ba9854;border-radius:7px;background:linear-gradient(#fff9dc,#e8d49d);color:#254f59;font:600 11px 'Segoe UI',sans-serif;letter-spacing:normal}
.bm-bomb::before{content:'';display:block;width:18px;height:18px;border-radius:50%;background:radial-gradient(ellipse at 30% 25%,#fff3c2 0 10%,#344c5e 15% 75%,#20303c);border:2px solid #c7a352;box-shadow:2px -4px 0 -2px #b18b39}
.bm-bomb[hidden]{display:none!important}
#bm-feedback{height:auto;min-height:45px;line-height:1.35;margin-block:12px}
.bm-bomb-hint{font-size:11px;line-height:1.5}
.bm-bomb[aria-pressed=true]{outline:3px solid #f6cf64;outline-offset:2px;background:linear-gradient(#fff1ba,#e7bd54)!important}
.bm-blast-shake{animation:bm-blast-shake .45s ease-out}
@keyframes bm-blast-shake{0%,100%{transform:translate(0)}15%{transform:translate(-6px,3px)}30%{transform:translate(6px,-4px)}45%{transform:translate(-4px,-2px)}60%{transform:translate(3px,2px)}80%{transform:translate(-1px,1px)}}
.bm-reduced .bm-blast-shake{animation:none}
@media(prefers-reduced-motion:reduce){.bm-blast-shake{animation:none!important}}
@media(max-width:759px),(hover:none) and (pointer:coarse){
  #bm-feedback{height:40px;min-height:40px;margin:0;font-size:12px;line-height:1.3}
  .bm-bomb-hint{grid-column:1/-1;text-align:center;margin:2px 0;font-size:10px}
  .bm-brandline{height:32px}
  .bm-brandline .bm-bomb{margin-left:auto;min-width:90px;min-height:28px;padding:3px 6px;font-size:10px}
  .bm-brandline .bm-bomb::before{width:14px;height:14px}
  #bm-skip{position:static;grid-column:1/-1;justify-self:end;min-height:28px;padding:3px 8px}
}
@media(max-width:759px) and (max-height:670px){#bm-feedback{height:28px;min-height:28px;font-size:11px}.bm-brandline{height:28px}}
.bm-charge-dots{display:inline-flex;gap:4px;margin-left:8px;vertical-align:middle}
.bm-charge-dots i{display:block;width:9px;height:9px;box-sizing:border-box;border:1px solid #ae914f;background:#fff9df;transform:rotate(45deg)}
.bm-charge-dots i.filled{background:#368c81;border-color:#24645e;box-shadow:inset 0 0 0 1px #b4e4ce}
.bm-rescue-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 28px));max-height:calc(100dvh - 100px);overflow:auto;padding:28px;text-align:center;color:#2c535d;background:#fff9ed;border:2px solid #bf9b51;border-radius:24px;box-shadow:0 24px 80px #153c4e66,inset 0 0 0 4px #fff0c3;font-family:'Segoe UI',sans-serif}
.bm-rescue-dialog::backdrop{background:#143d475c;backdrop-filter:blur(4px)}
.bm-rescue-gem{width:68px;height:68px;background:url('icon-192.png') center/contain no-repeat;margin:0 auto 10px;filter:drop-shadow(0 5px 5px #6c652b33)}
.bm-rescue-dialog h2{font-size:30px;color:#725321;line-height:1.15;margin:8px 0 16px}
.bm-rescue-dialog p{font-size:14px;line-height:1.55;margin:12px 0}
.bm-rescue-dialog .bm-kicker{font-size:11px;color:#82602c;letter-spacing:.15em;font-weight:700;text-transform:uppercase}
.bm-rescue-clock{display:flex;flex-direction:column;justify-content:center;width:88px;height:88px;border-radius:50%;margin:20px auto;background:linear-gradient(#fffdf1,#f0e1b3);border:2px solid #c4a363;box-shadow:inset 0 0 0 4px #fff9de;color:#80602c}
.bm-rescue-clock strong{font-size:36px;line-height:1;font-variant-numeric:tabular-nums}.bm-rescue-clock span{font-size:10px;margin-top:3px}
#bm-rescue-status{min-height:22px;color:#325f67;font-weight:600}
.bm-rescue-actions{display:grid;gap:10px;margin-top:18px}
.bm-rescue-actions button{border:1px solid #af904c;border-radius:11px;min-height:46px;padding:10px 14px;background:#f3ead0;color:#3e5860;font:700 14px 'Segoe UI',sans-serif}
.bm-rescue-actions #bm-rescue-try{background:linear-gradient(#ffed9e,#edbd4c);color:#594019;box-shadow:0 3px #ae8435}
.bm-rescue-actions button:focus-visible{outline:3px solid #24788b;outline-offset:3px}
.bm-rescue-dialog[data-phase=unavailable] .bm-rescue-clock{display:none}
@media(max-height:600px){.bm-rescue-dialog{padding:18px}.bm-rescue-gem{width:42px;height:42px}.bm-rescue-clock{width:65px;height:65px;margin:12px auto}.bm-rescue-dialog h2{font-size:25px}.bm-rescue-dialog p{margin:8px 0}}
.bm-tutorial-guide{position:fixed;inset:0;z-index:90;pointer-events:none;overflow:hidden}
.bm-tutorial-guide[hidden]{display:none}
.bm-guide-route{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.bm-guide-route-shadow{fill:none;stroke:#24464d99;stroke-width:6;stroke-linecap:round;stroke-dasharray:3 12}
.bm-guide-route-line{fill:none;stroke:#fff0ab;stroke-width:3;stroke-linecap:round;stroke-dasharray:3 12}
.bm-guide-target{fill:#fff4c32b;stroke:#ffe7a0;stroke-width:3}
.bm-guide-piece{position:absolute;pointer-events:none;filter:drop-shadow(0 5px 5px #203d4d88)}
.bm-guide-hand{position:absolute;left:0;top:0;width:52px;height:65px;overflow:visible;filter:drop-shadow(0 3px 3px #1b353a66);transform-origin:21px 9px;will-change:transform}
.bm-tutorial-complete{box-sizing:border-box;width:min(440px,calc(100vw - 28px));max-height:calc(100dvh - 100px);padding:30px 28px;text-align:center;color:#2b535b;background:#fff9ec;border:2px solid #c4a051;border-radius:24px;box-shadow:0 22px 70px #163e4c66,inset 0 0 0 4px #fff0c3;overflow:auto;font-family:'Segoe UI',sans-serif}
.bm-tutorial-complete::backdrop{background:#143b4659;backdrop-filter:blur(4px)}
.bm-tutorial-complete-medal{position:relative;width:100px;height:100px;margin:0 auto 18px;border:2px solid #c9a052;border-radius:50%;background:#fff0bc url('icon-192.png') center/80% no-repeat;box-shadow:0 6px 18px #91713326,inset 0 0 0 5px #fff8de}
.bm-tutorial-complete-medal span{position:absolute;right:-3px;bottom:0;display:grid;place-items:center;width:32px;height:32px;background:#39836d;color:#fff9dc;border:2px solid #f9efbc;border-radius:50%;font-size:21px;font-weight:800}
.bm-tutorial-complete h2{font-size:30px;line-height:1.2;color:#77551f;margin:10px 0 18px}
.bm-tutorial-complete p{font-size:15px;line-height:1.6;margin:12px 0}
.bm-tutorial-complete .bm-kicker{font-size:11px;letter-spacing:.15em;color:#88662e;font-weight:800;text-transform:uppercase}
.bm-tutorial-complete-mode{font-weight:700}
#bm-tutorial-continue{width:100%;min-height:48px;margin-top:18px;padding:12px;border:1px solid #b58a34;border-radius:12px;color:#594018;background:linear-gradient(#fff0a7,#edbd4b);box-shadow:0 3px #a98135;font:700 15px 'Segoe UI',sans-serif}
#bm-tutorial-continue:focus-visible{outline:3px solid #28788a;outline-offset:3px}
@media(max-height:600px){.bm-tutorial-complete{padding:20px}.bm-tutorial-complete-medal{width:68px;height:68px;margin-bottom:10px}.bm-tutorial-complete h2{font-size:25px;margin-block:8px}}
@keyframes bm-reward-arrive{from{opacity:0;translate:0 -30px;scale:.8}to{opacity:1;translate:0 0;scale:1}}
@keyframes bm-reward-jewel{50%{transform:rotate(8deg) scale(1.16)}}
@keyframes bm-star-arrive{from{opacity:0;transform:translateY(20px) rotate(-35deg) scale(.2)}65%{opacity:1;transform:translateY(-4px) rotate(7deg) scale(1.35)}to{opacity:1;transform:none}}
.bm-reduced .bm-reward,.bm-reduced .bm-reward-jewel,.bm-reduced .bm-star-earned{animation:none}
@media(prefers-reduced-motion:reduce){.bm-reward,.bm-reward-jewel,.bm-star-earned{animation:none!important}}

.bm-rules-help{margin:0 0 16px;color:#284b59;font-size:14px;line-height:1.5}
.bm-rules-help summary{width:max-content;max-width:100%;box-sizing:border-box;cursor:pointer;padding:9px 16px;border:1px solid #b99b62;border-radius:8px;background:#fff8e7;color:#77551d;font-weight:700}
.bm-rules-help[open]{padding:12px;border:1px solid #b99b62;border-radius:10px;background:#fff8e7}
.bm-rules-help p{margin:10px 0 0}
@media(min-width:760px) and (hover:hover) and (pointer:fine){
  #screen-result.screen{justify-content:center;gap:0;padding:64px 18px calc(var(--game-footer-height,57px) + 14px)}
  #screen-result .bm-result{display:grid;grid-template-columns:82px minmax(0,1fr);gap:6px 16px;max-width:590px;margin:0 auto;padding:14px 20px;border-width:14px}
  #screen-result #bm-result-heading{grid-column:1/-1;margin:0;font-size:12px;line-height:1.3}
  #screen-result .bm-result-gem{grid-column:1;grid-row:2/span 2;align-self:center;width:82px;height:82px;margin:0}
  #screen-result #bm-result-score{grid-column:2;grid-row:2;align-self:end;font-size:54px;line-height:1.1}
  #screen-result #bm-result-score.bm-long-score{font-size:40px}
  #screen-result #bm-result-stars{grid-column:2;grid-row:3;min-height:0;line-height:1.2;font-size:25px}
  #screen-result #bm-result-stars:empty{display:none}
  #screen-result #bm-result-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:4px 0;padding:10px 0;gap:8px;font-size:11px;line-height:1.3}
  #screen-result #bm-result-stats>div{min-width:0}
  #screen-result #bm-result-stats strong{font-size:23px}
  #screen-result :is(#bm-result-affinity,#bm-result-credit,[data-personal-scores]){grid-column:1/-1;margin:2px 0;font-size:12px;line-height:1.4}
  #screen-result .bm-result-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
  #screen-result .bm-result-actions .btn{flex:1 1 130px;min-width:0;width:auto;min-height:44px;margin:0;padding:10px 8px;font-size:14px;line-height:1.2;letter-spacing:0}
  #screen-result .bm-result-footnote{grid-column:1/-1;margin:6px 0 0;font-size:11px;line-height:1.3}
}
/* Keep the entry artwork unchanged; compact only the end-of-run summary. */
@media(max-width:759px),(hover:none) and (pointer:coarse) and (max-width:1000px){
  #screen-result.screen{justify-content:flex-start;gap:0;padding:76px 10px calc(var(--game-footer-height,57px) + 8px)}
  #screen-result .bm-result{display:grid;grid-template-columns:74px minmax(0,1fr);gap:4px 10px;padding:8px 10px;border-width:10px}
  #screen-result #bm-result-heading{grid-column:1/-1;margin:0;font-size:11px;line-height:1.2}
  #screen-result .bm-result-gem{grid-column:1;grid-row:2/span 2;align-self:center;justify-self:center;width:74px;height:74px;margin:0}
  #screen-result #bm-result-score{grid-column:2;grid-row:2;align-self:end;font-size:42px;line-height:1.1}
  #screen-result #bm-result-score.bm-long-score{font-size:clamp(24px,8vw,36px)}
  #screen-result #bm-result-stars{grid-column:2;grid-row:3;align-self:start;min-height:0;font-size:22px;line-height:1.1;letter-spacing:.08em}
  #screen-result #bm-result-stars:empty{display:none}
  #screen-result #bm-result-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:4px 0;padding:8px 0;font-size:10px;line-height:1.2}
  #screen-result #bm-result-stats>div{grid-column:span 2;min-width:0;overflow-wrap:anywhere}
  #screen-result #bm-result-stats>div:nth-child(n+4){grid-column:span 3}
  #screen-result #bm-result-stats strong{font-size:20px;line-height:1.2}
  #screen-result :is(#bm-result-affinity,#bm-result-credit,[data-personal-scores]){grid-column:1/-1;margin:2px 0;font-size:11px;line-height:1.3}
  #screen-result .bm-result-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
  #screen-result .bm-result-actions .btn{flex:1 1 96px;min-width:0;min-height:44px;width:auto;max-width:none;margin:0;padding:6px 4px;font-size:12px;line-height:1.2;letter-spacing:0}
  #screen-result .bm-result-footnote{display:none}
}
@media(max-height:500px) and (min-width:600px) and (max-width:1000px){
  #screen-result.screen{max-width:900px;padding-top:54px}
  #screen-result .bm-result{grid-template-columns:minmax(150px,.8fr) minmax(0,1.2fr);gap:4px 16px;margin:0;padding:6px 8px;border-width:8px}
  #screen-result #bm-result-heading{grid-column:1;grid-row:1}
  #screen-result .bm-result-gem{grid-column:1;grid-row:2/span 2}
  #screen-result #bm-result-score{grid-column:1;grid-row:4;align-self:center;font-size:32px}
  #screen-result #bm-result-score.bm-long-score{font-size:28px}
  #screen-result #bm-result-stars{grid-column:1;grid-row:5;align-self:center}
  #screen-result #bm-result-stats{grid-column:2;grid-row:1/span 2;grid-template-columns:repeat(5,minmax(0,1fr));align-self:center;margin:0;padding:6px 0;font-size:9px}
  #screen-result #bm-result-stats>div,#screen-result #bm-result-stats>div:nth-child(n+4){grid-column:auto}
  #screen-result #bm-result-affinity{grid-column:2;grid-row:3}
  #screen-result #bm-result-credit{grid-column:2;grid-row:4}
  #screen-result [data-personal-scores]{grid-column:2;grid-row:5}
  #screen-result :is(#bm-result-affinity,#bm-result-credit,[data-personal-scores]){margin:0;font-size:10px;line-height:1.2}
  #screen-result .bm-result-actions{grid-column:1/-1;grid-row:6;margin:0}
}
