/* Muze Chess: a responsive HTML5 studio over the canonical WordPress game. */
.muze-profile-chess[data-game-type="chess"]{--chess-light:#8c293d;--chess-light-2:#501928;--chess-dark:#27262b;--chess-dark-2:#141419;--chess-gold:#ffe0a3;--chess-move:#78e2c1;--muze-profile-accent:#f34270;--muze-profile-accent-2:#a72d4c;color:#f7f0ee;font:14px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;container-type:inline-size}
.muze-profile-chess[data-game-type="chess"] *{box-sizing:border-box;font-family:inherit}
.muze-profile-chess[data-game-type="chess"] :is(button,a,select){font:600 13px/1.3 system-ui,sans-serif!important;letter-spacing:0!important;text-shadow:none!important}
.muze-profile-chess[data-game-type="chess"] button:not([data-game-square]){min-height:40px!important;padding:9px 12px!important;border:1px solid #57414b!important;border-radius:10px!important;background:linear-gradient(145deg,#30252f,#201b23)!important;color:#fff6f3!important;box-shadow:inset 0 1px 0 #ffffff0c!important;cursor:pointer}
.muze-profile-chess[data-game-type="chess"] button:not([data-game-square]):hover{border-color:#fa6485!important;background:#402530!important}
.muze-profile-chess[data-game-type="chess"] button:focus-visible{outline:2px solid #ffe0a3!important;outline-offset:3px}
.muze-profile-chess[data-game-type="chess"] button:disabled{cursor:default}
.muze-profile-chess[data-game-type="chess"] .is-primary{background:linear-gradient(130deg,#b8294c,#872343)!important;border-color:#f06480!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess__match{gap:12px;padding:12px!important;border:1px solid #63404c!important;border-radius:14px!important;background:linear-gradient(125deg,#3a1827,#18181f)!important;align-items:center!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess__match span{color:#fca7b9;font-size:10px;letter-spacing:.12em;font-weight:750}
.muze-profile-chess[data-game-type="chess"] .muze-chess__match strong{font-size:17px;font-weight:700;line-height:1.4}
.muze-profile-chess[data-game-type="chess"] .muze-chess__window-actions{display:flex!important;flex-wrap:wrap;gap:6px;width:auto!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess__close-window{display:grid!important;place-items:center;min-width:40px!important;width:40px!important;height:40px!important;font-size:24px!important;padding:0!important;border-radius:50%!important}
.muze-profile-chess[data-game-type="chess"]:not(.is-expanded) .muze-chess__close-window{display:none!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess__board-frame{padding:clamp(6px,1.5vw,16px);border:2px solid #bd7d81;border-radius:12px;background:linear-gradient(130deg,#30292d,#100f14 45%,#47313b);box-shadow:0 12px 0 #100e12,0 16px 0 #261b22,0 27px 42px #0008,inset 0 0 0 3px #171216,inset 0 0 0 5px #bc324f}
.muze-profile-chess[data-game-type="chess"] .muze-chess__board-frame::before{height:2px;background:#ff4b72;box-shadow:0 0 12px #f42661;left:8px;right:8px;top:3px}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess{border:1px solid #c67582;border-radius:3px;overflow:hidden;aspect-ratio:1;grid-template-rows:repeat(8,minmax(0,1fr));box-shadow:0 0 12px #f5235840}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;aspect-ratio:1!important;padding:0!important;opacity:1!important;background:radial-gradient(ellipse at 25% 20%,#bb536248,transparent 70%),linear-gradient(140deg,#8c293d,#581d2c)!important;box-shadow:inset 0 0 0 .5px #0007!important;border:0!important;border-radius:0!important;touch-action:manipulation;transform:none!important}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+2),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+4),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+6),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+8),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+9),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+11),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+13),.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:nth-child(16n+15){background:radial-gradient(ellipse at 25% 20%,#49474c55,transparent 70%),linear-gradient(145deg,#25252a,#141418)!important}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button.is-selected{box-shadow:inset 0 0 0 3px #ffe0a3,inset 0 0 18px #ffe0a35c!important}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button.is-in-check{box-shadow:inset 0 0 0 3px #ff4169,inset 0 0 25px #f31a5c!important}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button>span{width:95%;height:100%;display:block;font-size:0!important;line-height:0!important;-webkit-text-stroke:0!important;text-shadow:none!important;background-repeat:no-repeat;background-size:600% 200%;background-position:var(--piece-x,0%) var(--piece-y,0%);background-image:url('chess/pieces.svg');filter:drop-shadow(0 3px 2px #0006)!important;transition:transform .16s ease}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button:not(.has-piece)>span{background-image:none}
.is-p{--piece-x:0%}.is-n{--piece-x:20%}.is-b{--piece-x:40%}.is-r{--piece-x:60%}.is-q{--piece-x:80%}.is-k{--piece-x:100%}.is-white-piece{--piece-y:0%}.is-black-piece{--piece-y:100%}
.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button>i{z-index:6;color:#ffe4dd;opacity:.65;font:600 clamp(7px,1vw,10px)/1 system-ui!important;bottom:3px;right:3px}
.muze-profile-chess[data-game-type="chess"] .muze-chess__legend{margin-top:20px;display:flex;flex-wrap:wrap;justify-content:center;gap:10px;font:500 10px/1.3 system-ui;color:#d2b9be}
.muze-profile-chess[data-game-type="chess"] :is(.muze-chess__capture-tray,.muze-chess__move-history,.muze-chess__position-tools){padding:12px!important;border:1px solid #40323c!important;border-radius:12px;background:linear-gradient(145deg,#27212a,#19171f)!important;overflow:visible}
.muze-profile-chess[data-game-type="chess"] .muze-chess__side header{font:700 11px/1.4 system-ui;letter-spacing:.04em;color:#e7cdd1}
.muze-profile-chess[data-game-type="chess"] .muze-chess__move-history ol{max-height:260px;overflow:auto!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess__controls{gap:8px;padding-top:12px;margin:0}
.muze-profile-chess[data-game-type="chess"] .muze-chess__save-note{font-size:11px;line-height:1.4;color:#b8a8b1}
.muze-profile-chess[data-game-type="chess"] .muze-profile-arcade__turn{padding:9px 12px;margin:8px 0;border-radius:8px;background:#221d27;color:#e4d5dc;font:600 13px/1.3 system-ui}
.muze-profile-chess[data-game-type="chess"] .muze-profile-arcade__turn.is-yours{color:#a2f1d7;background:#142b27}
.muze-chess-studio-nav{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:10px 0 14px}
.muze-profile-chess[data-game-type="chess"] .muze-chess-studio-nav button{min-height:36px!important;font-size:12px!important;padding:7px 10px!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess-studio-nav [data-chess-view-button][aria-pressed="true"]{border-color:#ec718d!important;background:#552538!important}
.muze-chess-studio-nav [data-chess-sound]{margin-left:auto}
.muze-profile-chess[data-game-type="chess"].is-compact .muze-chess-studio-nav{display:none}
.muze-profile-chess[data-game-type="chess"].is-expanded{inset:16px!important;transform:none!important;width:auto!important;max-width:1440px!important;min-width:0!important;height:auto!important;max-height:calc(100dvh - 32px)!important;min-height:0!important;margin:auto!important;padding:18px!important;resize:none!important;border:1px solid #75505d;border-radius:18px;background:radial-gradient(ellipse at top,#341a29 0%,#15141b 52%,#0f0f14 100%);overflow:auto!important;overscroll-behavior:contain;container-type:normal}
.muze-profile-chess[data-game-type="chess"].is-expanded>.muze-chess,.muze-profile-chess[data-game-type="chess"].is-expanded>:where([data-game-live-shell])>.muze-chess{height:auto!important;min-height:0;display:block!important;overflow:visible!important}
.muze-profile-chess[data-game-type="chess"].is-expanded>[data-game-live-shell]{height:auto;min-height:0;grid-template-rows:auto auto}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__match{position:static!important;cursor:default;margin:0}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__live-status{height:auto;min-height:0;max-width:100%;padding:0;margin:6px 0;font:400 11px/1.4 system-ui;color:#bcaeb7;white-space:normal}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__arena{display:grid!important;grid-template-columns:minmax(135px,190px) minmax(0,1fr) minmax(135px,190px)!important;grid-template-rows:auto!important;gap:18px!important;align-items:start!important;overflow:visible!important;min-height:0!important}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__board-shell{grid-column:2!important;grid-row:1!important;width:100%!important;height:auto!important;max-width:min(100%,calc(100dvh - 265px))!important;min-height:0;margin:0 auto!important;display:block!important}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__side{display:grid!important;grid-template-columns:1fr!important;gap:12px;overflow:visible!important;min-width:0}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__side--you{grid-column:1!important;grid-row:1!important}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__side--them{grid-column:3!important;grid-row:1!important}
.muze-profile-chess[data-game-type="chess"].is-expanded.has-embedded-messenger .muze-chess__arena{grid-template-columns:minmax(130px,170px) minmax(0,1fr) minmax(260px,310px)!important}
.muze-profile-chess[data-game-type="chess"].is-expanded.has-embedded-messenger .muze-chess__side--them{grid-column:1!important;grid-row:2!important}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__messenger-slot{grid-column:3!important;grid-row:1/3!important;width:100%!important;min-width:0!important;min-height:340px!important;height:min(540px,65dvh)!important;max-height:none!important;border-color:#58404c;background:#1a1821}
.muze-profile-chess[data-game-type="chess"] .muze-chess-chat__composer{grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:10px}
.muze-profile-chess[data-game-type="chess"] .muze-chess-chat__composer textarea{min-width:0;font:400 16px/1.4 system-ui;max-height:100px}
.muze-profile-chess[data-game-type="chess"] .muze-chess-empty{position:relative;padding:18px;gap:16px;border:1px solid #73434e;border-radius:16px;background:radial-gradient(ellipse at top right,#65233855,transparent 60%),#19161e}
.muze-profile-chess[data-game-type="chess"] .muze-chess-empty__piece{background:transparent;box-shadow:none;font-size:0;width:90px;height:100px;background-image:url('chess/pieces.svg');background-size:600% 200%;background-position:20% 0%}
.muze-profile-chess[data-game-type="chess"] .muze-chess-empty strong{font:750 24px/1.2 system-ui!important;letter-spacing:-.03em;color:#fff1ed}
.muze-profile-chess[data-game-type="chess"] .muze-chess-empty p{font:400 13px/1.6 system-ui;color:#c7b8c1}
.muze-profile-chess[data-game-type="chess"] :is(.muze-chess-friend-setup,.muze-chess-ai-setup){padding:16px;border:1px solid #503744;border-radius:14px;background:#241c28;min-width:0}
.muze-profile-chess[data-game-type="chess"] :is(.muze-chess-friend-setup,.muze-chess-ai-setup) header strong{font-size:16px!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess-start-options select{width:100%;font-size:16px!important;min-height:44px!important;background:#17151e;border-color:#624251}
.muze-profile-chess[data-game-type="chess"] .muze-chess-start-options{grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px;min-width:0}
.muze-profile-chess[data-game-type="chess"] .muze-chess-demo-test{grid-column:1/-1}
.muze-profile-chess[data-game-type="chess"].is-compact .muze-chess-empty{grid-template-columns:64px minmax(0,1fr);align-items:center;gap:12px}
.muze-profile-chess[data-game-type="chess"].is-compact .muze-chess-empty__piece{width:64px;height:78px}
.muze-profile-chess[data-game-type="chess"].is-compact .muze-chess-empty__toggle{grid-column:1/-1;width:100%!important}
.muze-chess-promotion{position:fixed;inset:0;width:min(440px,calc(100vw - 24px));height:fit-content;max-height:calc(100dvh - 24px);overflow:auto;margin:auto;padding:24px;border:1px solid #b2566f;border-radius:18px;background:linear-gradient(145deg,#30202f,#12121a);color:#fff3ee;box-shadow:0 24px 100px #000c;font:14px/1.5 system-ui,sans-serif}
.muze-chess-promotion::backdrop{background:#08060cba;backdrop-filter:blur(5px)}
.muze-chess-promotion h2{font:700 22px/1.2 system-ui;margin:0 0 8px;color:inherit}
.muze-chess-promotion p{margin:0;color:#d1b7c0}
.muze-chess-promotion__choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0}
.muze-chess-promotion button{font:600 13px/1.3 system-ui;color:#fff2ef;border:1px solid #6e4155;border-radius:10px;background:#312231;padding:10px;min-height:44px;cursor:pointer}
.muze-chess-promotion button:focus-visible{outline:2px solid #ffe0a3;outline-offset:3px}
.muze-chess-promotion__choices button{display:grid;padding:4px 4px 12px;gap:8px}
.muze-chess-promotion .muze-chess-sprite{display:block;width:100%;aspect-ratio:1;font-size:0;background:url('chess/pieces.svg') var(--piece-x) var(--piece-y)/600% 200% no-repeat}
@media(min-width:1001px){.muze-profile-chess[data-game-type="chess"] .muze-chess-studio-nav [data-chess-view-button]{display:none!important}}
@media(max-width:1000px){
 .muze-profile-chess[data-game-type="chess"].is-expanded{inset:8px!important;padding:12px!important;max-height:calc(100dvh - 16px)!important;border-radius:14px;max-width:none!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__arena,.muze-profile-chess[data-game-type="chess"].is-expanded.has-embedded-messenger .muze-chess__arena{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;gap:12px!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__board-shell{grid-column:1!important;grid-row:1!important;width:100%!important;max-width:min(100%,600px)!important;height:auto!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__side--you,.muze-profile-chess[data-game-type="chess"].is-expanded.has-embedded-messenger .muze-chess__side--you{grid-column:1!important;grid-row:auto!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__side--them,.muze-profile-chess[data-game-type="chess"].is-expanded.has-embedded-messenger .muze-chess__side--them{grid-column:1!important;grid-row:auto!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__messenger-slot{grid-column:1!important;grid-row:auto!important;height:calc(100dvh - 265px)!important;min-height:280px!important}
 .muze-profile-chess[data-game-type="chess"][data-chess-view="board"] .muze-chess__side,.muze-profile-chess[data-game-type="chess"][data-chess-view="board"] .muze-chess__messenger-slot{display:none!important}
 .muze-profile-chess[data-game-type="chess"][data-chess-view="details"] .muze-chess__board-shell,.muze-profile-chess[data-game-type="chess"][data-chess-view="details"] .muze-chess__messenger-slot{display:none!important}
 .muze-profile-chess[data-game-type="chess"][data-chess-view="chat"] .muze-chess__board-shell,.muze-profile-chess[data-game-type="chess"][data-chess-view="chat"] .muze-chess__side{display:none!important}
 .muze-profile-chess[data-game-type="chess"] .muze-chess__move-history,.muze-profile-chess[data-game-type="chess"] .muze-chess__position-tools{display:block!important}
 .muze-profile-chess[data-game-type="chess"] .muze-chess__match{flex-direction:row!important;align-items:center!important}
 .muze-profile-chess[data-game-type="chess"] .muze-chess__match strong{font-size:14px;white-space:normal;overflow-wrap:anywhere}
 .muze-profile-chess[data-game-type="chess"] .muze-chess__window-actions{flex:0 0 auto}
 .muze-profile-chess[data-game-type="chess"].is-expanded [data-chess-expand],.muze-profile-chess[data-game-type="chess"].is-expanded [data-chess-chat]{display:none!important}
}
@media(max-width:380px){
 .muze-profile-chess[data-game-type="chess"].is-expanded{inset:4px!important;padding:8px!important;max-height:calc(100dvh - 8px)!important}
 .muze-profile-chess[data-game-type="chess"] .muze-chess-studio-nav{gap:4px}
 .muze-profile-chess[data-game-type="chess"] .muze-chess-studio-nav button{font-size:11px!important;padding:7px!important}
 .muze-profile-chess[data-game-type="chess"] .muze-chess-studio-nav [data-chess-sound]{margin-left:0}
 .muze-chess-promotion{padding:16px}.muze-chess-promotion__choices{gap:4px}
}
@media(prefers-reduced-motion:reduce){.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button,.muze-profile-chess[data-game-type="chess"] .muze-game-board--chess button>span{animation:none!important;transition:none!important}}

@media(min-width:1001px){
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess-studio-nav{position:absolute;right:20px;top:125px;margin:0}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__board-shell{max-width:min(100%,calc(100dvh - 330px))!important}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__arena{margin-top:16px}
}

@media(min-width:1001px){
.muze-profile-chess[data-game-type="chess"].is-expanded:not(.has-embedded-messenger) .muze-chess__arena{grid-template-columns:minmax(150px,210px) minmax(0,1fr)!important;max-width:1050px;margin-inline:auto}
}

/* A shallow, physically lit board; keep the canonical grid for keyboard and AT. */
.muze-profile-chess[data-game-type="chess"] .muze-chess__board-frame.has-depth-board{position:relative;aspect-ratio:1;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;overflow:visible!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess__board-frame.has-depth-board::before,.muze-profile-chess[data-game-type="chess"] .muze-chess__board-frame.has-depth-board::after{display:none!important}
.muze-profile-chess[data-game-type="chess"] .has-depth-board>.muze-game-board--chess{position:absolute!important;inset:0!important;opacity:0!important;pointer-events:none!important;margin:0!important}
.muze-profile-chess[data-game-type="chess"] .muze-chess-depth{position:relative;display:block;width:100%!important;height:auto!important;aspect-ratio:1;touch-action:manipulation;cursor:pointer;outline:none}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__match{padding:8px 12px!important;min-height:52px}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__match strong{font-size:14px}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__live-status{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap!important}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__legend{margin-top:0;font-size:10px}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess-studio-nav [data-chess-view-button]:not([hidden]){display:block!important}
.muze-profile-chess[data-game-type="chess"].is-expanded [data-chess-view-button][hidden]{display:none!important}
.muze-profile-chess[data-game-type="chess"].is-expanded [data-chess-sound]{margin-left:auto}
.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__controls{justify-content:center}
.muze-profile-chess[data-game-type="chess"].is-expanded [data-chess-chat]{display:none!important}
.muze-profile-chess[data-game-type="chess"].is-expanded:not([data-chess-view="details"]) :is(.muze-chess__controls,[data-game-queue],.muze-chess__save-note){display:none!important}
.muze-profile-chess[data-game-type="chess"].is-expanded[data-chess-view="details"] .muze-chess__controls{display:flex!important}
@media(min-width:1001px){
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess-studio-nav{position:static!important;margin:8px 0 0!important;justify-content:center}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__arena,.muze-profile-chess[data-game-type="chess"].is-expanded:not(.has-embedded-messenger) .muze-chess__arena,.muze-profile-chess[data-game-type="chess"].is-expanded.has-embedded-messenger .muze-chess__arena{grid-template-columns:minmax(0,1fr)!important;margin:0 auto!important;max-width:1250px}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__board-shell{grid-column:1!important;max-width:min(100%,calc(100dvh - 280px))!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__side,.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__messenger-slot{display:none!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded[data-chess-view="details"] .muze-chess__arena{grid-template-columns:minmax(180px,220px) minmax(0,1fr)!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded[data-chess-view="details"] .muze-chess__side--you{display:grid!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded[data-chess-view="details"] .muze-chess__board-shell{grid-column:2!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded[data-chess-view="chat"].has-embedded-messenger .muze-chess__arena{grid-template-columns:minmax(0,1fr) minmax(260px,320px)!important}
 .muze-profile-chess[data-game-type="chess"].is-expanded[data-chess-view="chat"].has-embedded-messenger .muze-chess__messenger-slot{display:flex!important;grid-column:2!important;grid-row:1!important;margin-top:15px}
}
@media(max-width:600px){.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__board-shell{max-width:100%!important}.muze-profile-chess[data-game-type="chess"].is-expanded .muze-chess__arena{gap:4px!important}}
