/* The .scr.dim/.menu-panel contract supplies the generated ivory scroll. */
#scr-squad [hidden],#squad-hud[hidden],#squad-pause-vote[hidden]{display:none!important}
#scr-squad .squad-sheet{width:min(1000px,100%)}
#scr-squad .squad-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:12px}
#scr-squad .squad-heading h2{margin:0;font-size:32px;text-wrap:nowrap}
#squad-code{font-size:30px;letter-spacing:3px;font-weight:700;user-select:text;color:#65472f}
#squad-countdown{min-width:1ch;text-align:center;font-size:42px;line-height:1;color:#a74525;font-weight:700}
#scr-squad .squad-content{padding:0 4px 0 0;overscroll-behavior:contain}
#squad-lobby h3{font-size:24px;margin:0 0 10px}
#squad-lobby-status{font-size:21px;margin:0 0 12px}
#squad-public-rooms{display:grid;gap:8px;margin-bottom:16px}
.squad-public-room{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:8px;background:#e5ddc0;border:1px solid #b4aa89}
.squad-public-room strong{font-size:22px;overflow-wrap:anywhere;min-width:0;line-height:1.15}
.squad-public-room span{font-size:20px;white-space:nowrap}
#scr-squad .squad-public-room .btn{min-width:64px;min-height:44px;margin:0;padding:8px;font-size:20px;touch-action:manipulation}
#squad-create-options{border:0;padding:0;margin:6px 0 16px;min-width:0}
#squad-create-options legend{font-size:22px;margin-bottom:10px}
#scr-squad #squad-create-options label{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px;margin-bottom:8px;background:#e5ddc0;border:2px solid #b4aa89;cursor:pointer}
#scr-squad #squad-create-options label:has(:checked){border-color:#516c3b;background:#d8dfbe}
#squad-create-options input{width:22px;height:22px;accent-color:#485e35;margin:0;flex:none}
#scr-squad .squad-join,#scr-squad .squad-character{display:grid;gap:6px;max-width:480px;margin:6px 0 14px}
#scr-squad label{font-size:21px;line-height:1.2}
#squad-code-input{font:26px Pixelify,monospace;min-height:48px;width:100%;min-width:0;padding:8px 12px;border:2px solid #766c51;border-radius:0;background:#fbf2d7;color:#282b20;letter-spacing:4px;text-transform:uppercase}
#squad-character-select{width:100%;min-width:0;font-size:21px;min-height:46px}
.squad-members{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:2px 0 18px}
.squad-member{display:grid;grid-template-rows:auto 1fr;align-content:start;min-width:0;padding:10px;background:#e5ddc0;border:2px solid #b4aa89;gap:8px}
.squad-member>img{display:block;width:100%;max-height:208px;aspect-ratio:3/4;object-fit:contain;image-rendering:pixelated}
.squad-member>div{display:grid;align-content:start;gap:4px;min-width:0}
.squad-member-name{display:block;font-size:23px;line-height:1.15;overflow-wrap:anywhere}
.squad-member-character{display:block;font-size:19px;line-height:1.15;overflow-wrap:anywhere}
.squad-member-status{display:block;color:#6c604a;font-size:19px;line-height:1.2}
.squad-member[data-ready=true]{border-color:#516c3b;background:#d8dfbe}
.squad-member[data-ready=true] .squad-member-status{color:#2b542e;font-weight:700}
.squad-member[data-connected=false]{opacity:.65}
.squad-member[data-self=true]{box-shadow:inset 0 0 0 1px #856b37}
#scr-squad .squad-actions .btn{min-height:46px;font-size:20px}
#scr-squad .squad-actions .btn[aria-pressed=true]{background:#485e35;border-color:#5a7042}
#squad-message{grid-column:1/-1;font-size:20px;line-height:1.25;max-height:72px;overflow:auto;margin:0!important;overflow-wrap:anywhere}
#squad-message.is-error{color:#922d23}
.squad-result-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 16px}
.squad-result-facts>div{border:1px solid #b4aa89;background:#e5ddc0;padding:10px}
.squad-result-facts dt{font-size:19px}.squad-result-facts dd{font-size:28px;font-weight:700;margin:3px 0 0}
#squad-hud{position:fixed;z-index:9;left:calc(var(--game-left,0px) + max(12px,env(safe-area-inset-left)));top:calc(var(--game-top,0px) + 148px);display:grid;gap:5px;width:154px;pointer-events:none;color:#f8efd7;font:16px Pixelify,monospace}
.squad-health{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:6px;min-width:0;padding:4px 6px;background:#14231fe6;border:1px solid #6b735a;box-shadow:2px 2px #07100b80}
.squad-health>img{width:32px;height:32px;object-fit:contain;image-rendering:pixelated}
.squad-health>div{min-width:0}.squad-health strong{display:block;font-size:16px;line-height:1.05;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.squad-health span{display:block;font-size:15px;line-height:1.05;margin-top:2px}
.squad-health-track{height:5px;border:1px solid #e9dab4;background:#07100b;margin-top:3px;overflow:hidden}.squad-health-track i{display:block;height:100%;background:#56d8a1}
.squad-health[data-dead=true]{opacity:.65}.squad-health[data-dead=true] .squad-health-track i{background:#ff5f70}
#scr-pause:has(#squad-pause-vote:not([hidden])) .profile-actions .btn{min-width:0;min-height:44px;font-size:18px}
#squad-skills[hidden],#squad-pause[hidden],#squad-inventory[hidden]{display:none!important}
#squad-pause{position:fixed;z-index:10;left:calc(var(--game-left,0px) + var(--game-width,100vw) - max(16px,env(safe-area-inset-right)) - 44px);top:calc(var(--game-top,0px) + max(12px,env(safe-area-inset-top)));display:flex;align-items:center;justify-content:center;gap:5px;width:44px;height:44px;padding:9px;border:2px solid #a7b49c;border-radius:7px;background:#14231ff0;touch-action:manipulation}
#squad-pause>i{display:block;width:6px;height:23px;background:#f4edda;pointer-events:none}
#squad-pause:focus-visible,#squad-skills button:focus-visible{outline:3px solid #efc46e;outline-offset:3px}
#squad-skills{position:fixed;z-index:8;left:calc(var(--game-left,0px) + var(--game-width,100vw)/2);top:calc(var(--game-top,0px) + var(--game-height,100dvh) - 100px - env(safe-area-inset-bottom));transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(344px,calc(var(--game-width,100vw) - 24px));user-select:none}
.squad-skill{position:relative;display:grid;place-items:center;min-width:0;height:82px;padding:6px 5px 18px;background:#18251ff0;border:2px solid #667565;border-radius:5px;box-shadow:0 3px #090f0c;color:#f1e6c9;font:14px Pixelify,monospace;touch-action:none}
.squad-skill[aria-pressed=true]{border-color:#edbd68;background:#384331f5;box-shadow:inset 0 0 0 1px #edbd68,0 0 0 2px #0b120c,0 3px #090f0c}
.squad-skill:disabled{opacity:.35;cursor:default}.squad-skill kbd{position:absolute;left:4px;top:2px;font:13px Pixelify,monospace;color:#ddd0ae;pointer-events:none}
.squad-skill-icons{display:grid;place-items:center;width:100%;height:100%;pointer-events:none}.squad-skill-icon{position:relative;display:block;width:46px;height:46px;overflow:hidden;padding-right:6px;box-sizing:border-box}
.squad-skill-icon img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none}
.squad-skill-mask{position:absolute;inset:0 0 auto;background:#030806a6;box-shadow:0 2px #f6e3ae;pointer-events:none}
.squad-skill-track{position:absolute;right:0;top:0;bottom:0;width:5px;border:1px solid #e9dab4;background:#07100b;pointer-events:none}.squad-skill-track>i{position:absolute;inset:0 0 auto;background:#9ef0cd}.squad-skill-icon.is-cooling .squad-skill-track>i{background:#ffc052}
.squad-skill-icons.bonded{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}.squad-skill-icons.bonded .squad-skill-icon{width:26px;height:26px;padding-right:4px}.squad-skill-icons.bonded .squad-skill-track{width:4px}
.squad-skill-level{position:absolute;bottom:2px;left:0;right:0;text-align:center;line-height:14px;pointer-events:none}
#squad-inventory{position:fixed;z-index:8;left:max(calc(var(--game-left,0px) + 12px),calc(var(--game-left,0px) + var(--game-width,100vw)/2 - 312px));bottom:calc(100dvh - var(--game-top,0px) - var(--game-height,100dvh) + 18px + env(safe-area-inset-bottom));width:116px;max-height:calc(var(--game-height,100dvh) - 96px);overflow:auto;scrollbar-width:thin;user-select:none}
.squad-carried{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-bottom:6px}.squad-carried:empty{display:none}.squad-carried>img{width:36px;height:36px;image-rendering:pixelated;background:#18251ff0;border:1px solid #8d916e}
.squad-carried button{display:flex;align-items:center;justify-content:center;gap:2px;min-height:44px;min-width:44px;padding:4px;color:#edc3cc;font:17px Pixelify,monospace;border:2px solid #9b9090;background:#18251ff0}.squad-carried button img{image-rendering:pixelated}
.squad-tools{display:grid;grid-template-columns:repeat(2,48px);gap:8px;justify-content:end}
.squad-tools button{position:relative;width:48px;height:48px;padding:2px 6px 10px;border:2px solid #7d896f;border-radius:4px;background:#18251ff0;color:#f1e6c9;overflow:hidden;touch-action:manipulation}
.squad-tools img{image-rendering:pixelated}.squad-tool-mask{position:absolute;inset:0 0 auto;background:#030806a6;pointer-events:none}.squad-tool-count{position:absolute;right:2px;bottom:0;font:14px/14px Pixelify,monospace;text-shadow:1px 1px #000;pointer-events:none}
#squad-inventory button:focus-visible,body.squad-playing .mobile-bonds:focus-visible{outline:3px solid #efc46e;outline-offset:2px}
body.squad-playing .mobile-bonds{min-width:36px;min-height:44px;justify-content:center;outline:1px solid #c3b495;cursor:pointer;touch-action:manipulation}
body.squad-playing .mobile-bonds[aria-disabled=true]{opacity:.5;cursor:default}
@media(max-width:660px){#squad-inventory{bottom:calc(100dvh - var(--game-top,0px) - var(--game-height,100dvh) + 112px + env(safe-area-inset-bottom))}}
.squad-online-choice #lvl-reroll[hidden],.squad-online-choice #bond-back{display:none!important}
#squad-waiting{position:fixed;z-index:20;left:calc(var(--game-left,0px) + var(--game-width,100vw)/2);bottom:calc(100dvh - var(--game-top,0px) - var(--game-height,100dvh) + 184px + env(safe-area-inset-bottom));transform:translateX(-50%);box-sizing:border-box;width:max-content;max-width:calc(var(--game-width,100vw) - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));max-height:140px;overflow:auto;padding:10px 14px;border:2px solid #b6ae8e;background:#1d2b22f5;color:#f6e6be;font:22px/1.2 Pixelify,monospace;text-align:center;overflow-wrap:anywhere;touch-action:pan-y}
#squad-waiting[hidden]{display:none!important}
@media(max-height:450px){#squad-waiting{bottom:calc(100dvh - var(--game-top,0px) - var(--game-height,100dvh) + 92px + env(safe-area-inset-bottom));max-width:calc(var(--game-width,100vw) - 180px);max-height:min(140px,calc(var(--game-height,100dvh) - 112px))}}
.squad-online-choice .box{position:relative}
.squad-online-choice .box>h2,.squad-online-choice .augment-heading{padding-inline:44px}
.squad-choice-time{position:absolute;right:14px;top:0;font:700 25px Pixelify,monospace;color:#c4a16a}
.squad-choice-status{flex:none;font:20px/1.2 Pixelify,monospace;color:#f6e6be;text-align:center;margin:6px 0 0!important;max-height:52px;overflow:auto}
.squad-choice-status[hidden],.squad-choice-time[hidden]{display:none!important}
.squad-choice-status.is-error{color:#ffb2a2}
.squad-online-choice .cards.done .card{pointer-events:none;cursor:default}
.squad-online-choice .cards.done .card:not(.picked){opacity:.25}
@media(max-width:760px){
 .squad-members{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
 .squad-member{grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto;align-items:start;padding:8px;gap:7px}
 .squad-member>img{width:48px;height:64px;max-height:none;object-fit:cover}
 .squad-member-name{font-size:21px}.squad-member-character,.squad-member-status{font-size:18px}
 #squad-code{font-size:26px;letter-spacing:2px}
}
@media(max-width:420px){
 #scr-squad .squad-heading{gap:6px 10px;margin-bottom:10px}
 #scr-squad .squad-heading h2{font-size:29px}#squad-code{font-size:25px}#squad-countdown{font-size:34px}
 .squad-members{grid-template-columns:1fr}
 .squad-member{grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto;align-items:center;gap:8px;padding:8px}
 .squad-member>img{width:48px;height:64px;object-fit:cover}
 .squad-member-name{font-size:21px}.squad-member-character,.squad-member-status{font-size:18px}
 #scr-squad .squad-actions .btn{font-size:19px}#squad-back,#squad-leave{grid-column:1/-1}
 #scr-squad .squad-character{margin-bottom:8px}
 .squad-result-facts{grid-template-columns:1fr;gap:6px}
 .squad-result-facts>div{display:grid;grid-template-columns:1fr auto;align-items:center;padding:7px 10px}
 .squad-result-facts dd{font-size:26px;line-height:1.1;margin:0}
}
@media(max-height:450px){
 #scr-squad .squad-heading{margin-bottom:8px;gap:6px 14px}
 #scr-squad .squad-heading h2{font-size:28px}#squad-code{font-size:26px}#squad-countdown{font-size:32px}
 #scr-squad .squad-actions .btn{font-size:19px;min-height:44px}
 .squad-members{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:8px}
 .squad-member{grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto;padding:7px;gap:8px}
 .squad-member>img{width:44px;height:59px;object-fit:cover}.squad-member>div{gap:2px}
 .squad-member-name{font-size:21px}.squad-member-character,.squad-member-status{font-size:18px}
 #scr-squad .squad-character,#scr-squad .squad-join{margin:2px 0 8px;gap:4px}
 #squad-message{font-size:19px;max-height:44px}
 #squad-hud{top:calc(var(--game-top,0px) + 132px);gap:3px;width:146px}
 .squad-health{padding:3px 5px;grid-template-columns:28px minmax(0,1fr);gap:5px}.squad-health>img{width:28px;height:28px}
}
@media(max-height:300px) and (orientation:landscape){
 #squad-hud{width:196px}
 .squad-health>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 4px}
 .squad-health strong{grid-column:1;grid-row:1}.squad-health span{grid-column:2;grid-row:1;margin:0}
 .squad-health-track{grid-column:1/-1;grid-row:2;margin:0}
}
@media(max-width:600px) and (orientation:portrait){
 body.squad-playing #game-fullscreen.touch{left:auto;right:max(16px,env(safe-area-inset-right));top:calc(var(--game-top,0px) + 148px + env(safe-area-inset-top))}
 body.squad-playing:not(.mobile-skill-layout) #dash-action{top:calc(var(--game-top,0px) + var(--game-height,100dvh) - 164px - env(safe-area-inset-bottom))}
 body.squad-playing:not(.mobile-skill-layout) #game-fullscreen{top:calc(var(--game-top,0px) + var(--game-height,100dvh) - 218px - env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){#scr-squad *,#squad-hud *{animation:none!important;transition:none!important}}
.jutsu-rank{position:absolute;z-index:2;bottom:0;left:0;right:0;text-align:center;color:#ffd477;background:#111c12ed;font:13px/14px Pixelify,monospace;text-shadow:1px 1px #000;pointer-events:none}
.jutsu-rank[hidden]{display:none!important}
.squad-skill-level,.mobile-skill-level{color:#ffd477;font-size:15px;letter-spacing:1px}
