/* A sunlit Chess960 atelier. All positions and outcomes come from the game. */
body.arcade { color:#503323; background:#e9d7b9; --ink:#503323; --muted:#87684e; --line:#caac85; --accent:#62a9c9; --s1:#fff3dc; --s2:#f2dfbd; --s3:#ead0a5; --dim:#795b41; --faint:#92724e; --gold:#a65c34; --line2:#d0ad7e; }
body.arcade .site-header, body.arcade .nav-menu { background:#f8ecd7; border-color:#cfb389; }
body.arcade .site-header a, body.arcade .site-header button { color:#765437; }
body.arcade .site-header .logo-made { color:#528aa2; }
body.arcade .ac-share { background:#fff1d9; border-color:#d1b285; color:#765437; }
body.arcade .ac-share-msg { color:#765437; }
body.arcade #egm-play-header { background:#f7edda; border-bottom:1px solid #ccad87; color:#5e422c; box-shadow:none; min-height:34px; }
body.arcade #egm-play-header a, body.arcade #egm-play-header button { color:#65442e; }
body.arcade main.wrap { width:100%; max-width:none; padding:0; margin:0 auto; display:block; }
.c9-scene { width:min(100%,460px); margin:0 auto; padding:5px 31px 22px; box-sizing:border-box; background:#eddbb9 url('../assets/play/chess960/courtyard.webp') center top / 100% auto no-repeat; box-shadow:0 0 70px #8b5e3124; }
.c9-title { margin:0 auto 1px; width:94%; line-height:0; text-align:center; }
.c9-title img { width:100%; height:auto; filter:drop-shadow(0 3px 2px #65321d35); }
.c9-scene #c9-status { width:87%; min-height:34px; margin:0 auto 6px; padding:7px 10px; background:#fff3db; border:1px solid #cfad79; border-radius:10px 10px 17px 17px; color:#64472c; box-shadow:0 3px 0 #a7784b3b; font:700 12px/1.3 Georgia,serif; text-align:center; }
.c9-scene #c9-status b { color:#9a5030; }
.c9-scene .ac-layout.rail-right { display:flex; flex-direction:column; gap:8px; margin:0; }
.c9-scene .ac-stage { width:100%; min-width:0; min-height:0!important; border:0; padding:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
.c9-board { margin:0; border-style:solid; border-width:13px 20px 17px; border-image:url('../assets/play/chess960/board-frame.webp') 30 47 36 49 stretch; box-shadow:0 5px 7px #643c3255; background:#a56543; }
.c9-scene #c9-canvas { display:block; width:100%; touch-action:none; border-radius:0; }
.c9-scene .c9-seat { display:flex; align-items:center; min-height:20px; padding:2px 18px; gap:5px; background:#fff0d5bd; border:0; color:#694a32; font-size:10px; line-height:16px; }
.c9-scene #c9-seat-opp { border-radius:9px 9px 0 0; }
.c9-scene #c9-seat-me { border-radius:0 0 9px 9px; }
.c9-scene .c9-seat b { color:#694a32; font-size:10px; }
.c9-scene .c9-seat em { color:#805e41; font-size:9px; }
.c9-scene .c9-seat i { color:#a55130; }
.c9-scene .c9-tray canvas { max-height:19px; width:auto!important; }
.c9-scene .ac-rail { position:static; display:flex; flex-direction:column; gap:8px; min-width:0; }
.c9-scene .ac-panel { background:#fff1d9ee; border:1px solid #c9a778; padding:10px 12px; border-radius:12px; box-shadow:0 3px 0 #99714338, inset 0 1px 0 #fff9e9; color:#63472e; }
.c9-scene .ac-label { color:#8a6648; font-size:10px; font-weight:800; letter-spacing:1.4px; margin:0 0 5px; }
.c9-scene .ac-label .dot { display:none; }
.c9-scene #c9-pospanel { order:1; text-align:center; position:relative; padding:8px 10px; }
.c9-scene #c9-sp { display:flex; justify-content:center; align-items:baseline; gap:6px; margin:0 0 4px; }
.c9-scene #c9-spnum { font:700 26px/1 Georgia,serif; color:#704c30; }
.c9-scene #c9-spname { color:#8b6444; font-size:10px; }
.c9-scene #c9-arr { display:flex; justify-content:center; gap:3px; margin:4px 0 7px; }
.c9-scene #c9-arr > * { width:28px; height:30px; background:#eed5ad; color:#65422c; border:1px solid #d2ac7c; border-radius:4px; font-size:13px; box-shadow:inset 0 1px #fff6de; }
.c9-scene #c9-arr small { color:#9d7657; font-size:8px; }
.c9-scene .c9-genrow { display:grid; grid-template-columns:1.2fr .7fr minmax(46px,1fr) .7fr 1.2fr; gap:4px; align-items:center; }
.c9-scene .c9-genrow .mgb { min-width:0; padding:8px 3px; font-size:11px; }
.c9-scene button, .c9-scene input { font-family:inherit; }
.c9-scene .mgb, .c9-scene .ac-btn { min-height:38px; padding:8px 12px; border:1px solid #bd9868; border-radius:8px; background:linear-gradient(#fff8e6,#ebce9e); box-shadow:0 2px 0 #ad8055; color:#67472c; font-size:12px; font-weight:800; text-shadow:0 1px #fff6df; }
.c9-scene .mgb:hover, .c9-scene .ac-btn:hover { filter:brightness(1.04); transform:translateY(-1px); }
.c9-scene .mgb:active, .c9-scene .ac-btn:active { transform:translateY(1px); box-shadow:none; }
.c9-scene #c9-spin { min-width:0; width:100%; height:38px; border:1px solid #b28f65; border-radius:7px; background:#fff9eb; color:#64422b; font-size:14px; text-align:center; padding:3px; }
.c9-scene #c9-spin::placeholder { font-size:11px; color:#876c50; }
.c9-scene #c9-prev, .c9-scene #c9-next { padding:7px 11px; }
.c9-scene #c9-pnote { display:block; font-size:9px; line-height:1.35; color:#866448; margin:7px 0 0; }
.c9-scene #c9-castpanel { order:4; }
.c9-scene #c9-castle { color:#725137; font-size:11px; line-height:1.45; }
.c9-scene #c9-castle b, .c9-scene #c9-castle strong { color:#995333; }
.c9-scene .c9-castrow { background:#eed9b9; border-color:#d7b88e; color:#704b30; padding:5px 7px; }
.c9-scene #c9-ctrlpanel { order:3; padding:0; border:0; background:none; box-shadow:none; }
.c9-scene #c9-ctrlpanel > .ac-label { display:none; }
.c9-scene #c9-actions { margin:0!important; display:flex; gap:9px; }
.c9-scene #c9-actions .mgb, .c9-scene .mgb.primary, .c9-scene .ac-btn.primary { background:#77b4cf url('../assets/play/chess960/button-sky.webp') center / 100% 100% no-repeat; color:#fff8e8; text-shadow:0 2px 2px #356a89; border:0; box-shadow:0 3px 0 #5d8191; font:700 17px/1.15 Georgia,serif; min-height:46px; }
.c9-scene #c9-actions .mgb { flex:1; }
.c9-scene #c9-newpos { order:-1; flex:1.45!important; }
.c9-scene #c9-tally { color:#7b593e; text-align:center; font-size:10px; margin:0 0 5px; }
.c9-scene #c9-tally:empty { display:none; }
.c9-scene .ac-toggles { display:flex; justify-content:space-between; gap:10px; padding:10px 16px 0; color:#5f4934; }
.c9-scene .ac-toggles label { color:#5f4934; font-size:12px; display:flex; align-items:center; gap:6px; min-height:30px; cursor:pointer; }
.c9-scene input[type=checkbox] { accent-color:#5f9eb8; width:17px; height:17px; }
.c9-scene #c9-matchpanel { order:5; }
.c9-scene #c9-moves { color:#745237; background:#f8e7c9; max-height:125px; }
.c9-scene #c9-moves .ch-mvrow, .c9-scene #c9-moves .ch-mvrow span { color:#745237; }
.c9-scene #c9-moves .n { color:#aa8561; }
.c9-scene #c9-lobby { order:5; }
.c9-scene #c9-setup, .c9-scene #c9-overbox { position:static; inset:auto; order:0; padding:0; background:none; backdrop-filter:none; overflow:visible; border:0; min-height:0; }
.c9-scene .mg-panel, .c9-scene .mg-over { width:100%; max-width:none; padding:13px; border:1px solid #b99464; border-radius:13px; background:#fff1d8f5; color:#65462e; box-shadow:0 4px 0 #9e764945; }
.c9-scene .mg-panel h2, .c9-scene .mg-over h2 { font:700 26px/1.1 Georgia,serif; color:#805137; margin:0 0 4px; text-shadow:none; }
.c9-scene .mg-panel h2 em { color:#70a8bd; }
.c9-scene .mg-sub { color:#836145; font-size:11px; margin:0 0 9px; line-height:1.45; }
.c9-scene #c9-name, .c9-scene #c9-code { background:#fff9e9; color:#63452f; border:1px solid #cfb287; border-radius:7px; font-size:12px; padding:10px; margin:0 0 9px; }
.c9-scene .mg-modes { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
.c9-scene .mg-mode { grid-column:span 2; border:1px solid #7a9faf; background:linear-gradient(#b8deeb,#7aadc4); color:#354f5e; padding:9px 3px; min-height:75px; border-radius:8px; box-shadow:0 2px #648798; }
.c9-scene .mg-mode:nth-child(-n+2) { grid-column:span 3; min-height:63px; }
.c9-scene .mg-mode .ico { display:none; }
.c9-scene .mg-mode b { color:#fff9e8; text-shadow:0 1px 2px #4d788d; font:700 15px/1.2 Georgia,serif; }
.c9-scene .mg-mode span { color:#36566a; font-size:9px; margin-top:5px; line-height:1.3; }
.c9-scene .mg-mode:hover { filter:brightness(1.07); border-color:#477a91; }
.c9-scene #c9-mmstatus { color:#845c3b; margin-top:7px; font-size:11px; }
.c9-scene #c9-mmstatus:empty { display:none; }
.c9-scene #c9-livebox { margin-top:10px; }
.c9-scene .mg-over .ac-btnrow { flex-wrap:wrap; gap:7px; }
.c9-scene .mg-over h2 { color:#7e5034!important; }
.c9-scene :focus-visible { outline:3px solid #32728d; outline-offset:3px; }
.c9-scene #c9-spname { letter-spacing:0; text-transform:none; }
.c9-scene #c9-arr > * { padding:2px 0; height:31px; }
.c9-scene #c9-arr u { color:#805b3c; font-size:10px; }
.c9-scene #c9-pnote { font-size:10px; }
.c9-scene .c9-cast { padding:5px 0; border-color:#d7bc96; }
.c9-scene .c9-cast span, .c9-scene .c9-cast.off span, .c9-scene .c9-fine, .c9-scene .c9-castnone { color:#735338; font-size:11px; line-height:1.4; }
.c9-scene .c9-cast em, .c9-scene .c9-cast.off em { color:#8d5636; font-size:12px; }
.c9-scene .c9-side.w { background:#fff0cb; border-color:#c6a677; }
.c9-scene .c9-side.b { background:#aa522f; border-color:#743819; }
.c9-scene .c9-seat.turn { background:#fff2d8e6; box-shadow:inset 3px 0 #73a7ba; }
.c9-scene #c9-posmini { color:#9a5c3a; }
.c9-scene #c9-posmini span { color:#83664d; }
.c9-position-info { margin-top:8px; }
.c9-position-info summary { cursor:pointer; color:#795738; font-size:11px; line-height:1.6; }
.c9-scene #c9-pospanel > .ac-label { margin:0; font-size:9px; text-align:center; letter-spacing:1px; }
.c9-scene #c9-sp { margin:2px 0 9px; }
.c9-scene #c9-actions .mgb { border-radius:21px; background-color:transparent; box-shadow:0 3px 2px #5c716b62; font-size:16px; }
.c9-scene #c9-ctrlpanel { order:3; }
.c9-scene #c9-castpanel { order:2; padding:9px 11px; }
.c9-scene #c9-castle { margin-top:2px; }
.c9-scene .c9-cast { padding:3px 0; }
.c9-scene .c9-fine { margin-top:4px; }
.c9-scene #c9-castpanel > summary { cursor:pointer; font:700 12px/1.5 Georgia,serif; color:#75472c; }
.c9-scene #c9-castbrief { display:block; padding-left:13px; font:600 10px/1.6 system-ui,sans-serif; color:#7a593e; }
.c9-scene #c9-castpanel[open] #c9-castle { margin-top:7px; }
.c9-scene .ac-rail { width:100%!important; }
.c9-scene #c9-sp { margin:0 0 7px; gap:0; }
.c9-scene #c9-sp .c9-sp-prefix { font:700 23px/1 Georgia,serif; color:#8e512f; letter-spacing:0; }
.c9-scene #c9-spnum { color:#8e512f; }
.c9-scene #c9-pospanel > .ac-label { position:absolute; left:11px; top:14px; width:56px; font-size:8px; line-height:1.25; text-align:left; }
.c9-scene #c9-roll, .c9-scene #c9-link, .c9-scene #c9-prev, .c9-scene #c9-next { background:linear-gradient(#d0885d,#a44e29); border-color:#a76239; box-shadow:inset 0 1px #f5c293,0 2px #8a5437; color:#fff0cf; text-shadow:0 1px 1px #744324; }
.c9-scene #c9-spname { display:block; padding-top:6px; }
body.arcade #egm-play-header { font-size:11px; padding:4px 12px; min-height:30px; }
body.arcade #egm-play-header .egm-nav-toggle { min-height:28px; }
body.arcade main > .ac-hero, body.arcade .ac-content { max-width:850px; margin:26px auto; padding:20px; background:#fff4e3; border:1px solid #d5b991; border-radius:12px; color:#71553d; }
body.arcade .ac-hero p, body.arcade .ac-content p, body.arcade .ac-content li { color:#71553d; }
body.arcade .ac-content h2, body.arcade .ac-content h3 { color:#70472d; }
body.arcade .ac-content a, body.arcade .ac-hero a { color:#386d88; }
body.arcade .ac-hero .c9-long { display:inline; }
@media(min-width:900px) {
  .c9-scene { width:900px; padding:9px 28px 24px; background-size:100% auto; background-position:center 25%; border-radius:0 0 20px 20px; }
  .c9-title { width:430px; margin-left:5px; }
  .c9-scene #c9-status { width:380px; margin:0 0 10px 30px; }
  .c9-scene .ac-layout.rail-right { display:grid; grid-template-columns:440px minmax(0,1fr); align-items:start; gap:20px; }
  .c9-scene .ac-rail { gap:10px; }
  .c9-scene .c9-seat { min-height:25px; font-size:12px; }
}
@media(max-width:360px) {
  .c9-scene { padding-left:9px; padding-right:9px; }
  .c9-board { border-width:11px 16px 14px; }
  .c9-scene .mgb { padding-left:9px; padding-right:9px; }
}
