/* Dedicated craft desk for the two-player tic-tac-toe board. */
#fg-stage.craft-game {min-height:calc(100dvh - var(--classroom-play-height,72px));padding:8px 16px 18px;color:#553a3d;background:#c5e3f7 url("../tictactoe-craft/background.b0304c8bf54b.webp") center center / cover no-repeat;}
#fg-stage.craft-game .craft-layout {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);grid-template-areas:'title .' 'board sidebar';column-gap:clamp(12px,1.5vw,24px);align-items:start;width:min(100%,1160px,120dvh);margin:0 auto;}
#fg-stage.craft-game .craft-heading {grid-area:title;justify-self:center;width:58%;aspect-ratio:3.2 / 1;display:grid;place-items:center;background:url("../tictactoe-craft/title.a342425abb5b.webp") center / contain no-repeat;}
#fg-stage.craft-game .craft-heading h1 {display:flex;gap:.04em;margin:0;font-size:clamp(36px,5vw,72px);font-weight:900;line-height:1;white-space:nowrap;letter-spacing:-.035em;text-shadow:0 2px 0 #fff,0 4px 1px #9d5578;}
#fg-stage.craft-game .craft-heading h1 span:nth-child(1){color:#f1647b;}#fg-stage.craft-game .craft-heading h1 span:nth-child(2){color:#2385df;}#fg-stage.craft-game .craft-heading h1 span:nth-child(3){color:#a34ed1;}
#fg-stage.craft-game .craft-board {grid-area:board;min-width:0;width:100%;}
#fg-stage.craft-game #fg-board {--fg-cell-size:1fr!important;display:grid;grid-auto-rows:minmax(0,1fr);gap:2.8%;width:100%;max-width:none;aspect-ratio:1;padding:6.4%;border:0;border-radius:6%;background:#f8c300 url("../tictactoe-craft/board.9ac30f51eeb3.webp") center / 100% 100% no-repeat;box-sizing:border-box;}
#fg-stage.craft-game.craft-art-ready #fg-board {background-color:transparent;}
#fg-stage.craft-game .fg-tictactoe-cell,#fg-stage.craft-game .fg-tictactoe-cell.dark {width:100%;height:100%;min-width:0;aspect-ratio:1;border:0;border-radius:6%;background:#fff9e9;box-shadow:none;line-height:1;font-size:clamp(42px,8vw,110px);}
#fg-stage.craft-game.craft-art-ready .fg-tictactoe-cell,#fg-stage.craft-game.craft-art-ready .fg-tictactoe-cell.dark {background:transparent;}
#fg-stage.craft-game.craft-art-ready .fg-tictactoe-cell:is(.is-x,.is-o) {color:transparent;}
#fg-stage.craft-game.craft-art-ready .fg-tictactoe-cell:is(.is-x,.is-o)::before {content:'';position:absolute;inset:10%;background:center / contain no-repeat;pointer-events:none;}
#fg-stage.craft-game.craft-art-ready .fg-tictactoe-cell.is-x::before {background-image:url("../tictactoe-craft/x.c07f3e4c2582.webp");}
#fg-stage.craft-game.craft-art-ready .fg-tictactoe-cell.is-o::before {background-image:url("../tictactoe-craft/o.a38be4283447.webp");}
#fg-stage.craft-game .fg-tictactoe-cell.first-hint {box-shadow:none;}
#fg-stage.craft-game .fg-tictactoe-cell.winning-cell {filter:drop-shadow(0 0 7px #f78a21);}
#fg-stage.craft-game .fg-tictactoe-cell:focus-visible {outline:4px solid #5e2fa4;outline-offset:-4px;z-index:2;}
#fg-stage.craft-game .craft-sidebar {grid-area:sidebar;min-width:0;display:flex;flex-direction:column;align-items:center;gap:clamp(8px,1.5vw,20px);}
#fg-stage.craft-game .craft-notebook {position:relative;width:100%;aspect-ratio:1170 / 1340;background:#fff0bf url("../tictactoe-craft/panel.8232aace0aa6.webp") center / 100% 100% no-repeat;border-radius:7%;}
#fg-stage.craft-game.craft-art-ready .craft-notebook {background-color:transparent;}
#fg-stage.craft-game .craft-players {position:absolute;top:18%;left:17%;width:66%;height:27%;display:grid;grid-template-columns:1fr 1fr;gap:8%;}
#fg-stage.craft-game .craft-seat {display:grid;place-items:center;min-width:0;}
#fg-stage.craft-game .craft-seat .fg-turn-dot {display:none;}
#fg-stage.craft-game .craft-symbol {display:grid;place-items:center;width:100%;height:100%;font-size:clamp(38px,5vw,80px);font-weight:900;line-height:1;}
#fg-stage.craft-game .craft-seat--x .craft-symbol {color:#d83529;}#fg-stage.craft-game .craft-seat--o .craft-symbol {color:#1769cb;}
#fg-stage.craft-game.craft-art-ready .craft-symbol {color:transparent;background:center / contain no-repeat;}
#fg-stage.craft-game.craft-art-ready .craft-seat--x .craft-symbol {background-image:url("../tictactoe-craft/x.c07f3e4c2582.webp");}
#fg-stage.craft-game.craft-art-ready .craft-seat--o .craft-symbol {background-image:url("../tictactoe-craft/o.a38be4283447.webp");}
#fg-stage.craft-game .craft-current {position:absolute;top:52%;left:16%;width:68%;height:37%;display:flex;flex-direction:column;align-items:center;justify-content:center;}
#fg-stage.craft-game .craft-current strong {font-size:clamp(19px,2.3vw,34px);font-weight:900;line-height:1.15;white-space:nowrap;color:#67382a;}
#fg-stage.craft-game .craft-current-mark {display:grid;place-items:center;width:50%;height:68%;font-size:clamp(40px,5vw,80px);font-weight:900;line-height:1;color:#d83529;}
#fg-stage.craft-game.craft-art-ready .craft-notebook[data-turn='x'] .craft-current-mark {color:transparent;background:url("../tictactoe-craft/x.c07f3e4c2582.webp") center / contain no-repeat;}
#fg-stage.craft-game.craft-art-ready .craft-notebook[data-turn='o'] .craft-current-mark {color:transparent;background:url("../tictactoe-craft/o.a38be4283447.webp") center / contain no-repeat;}
#fg-stage.craft-game .craft-notebook[data-turn='o'] .craft-current-mark {color:#1769cb;}
#fg-stage.craft-game .craft-reset {width:100%;min-height:54px;aspect-ratio:3 / 1;padding:0 9%;border:0;border-radius:999px;background:#8939b9 url("../tictactoe-craft/button.cffcfb85bd05.webp") center / 100% 100% no-repeat;color:#fff;font-size:clamp(20px,2.8vw,42px);font-weight:900;line-height:1;white-space:nowrap;text-shadow:0 2px 2px #482366;cursor:pointer;}
#fg-stage.craft-game .craft-reset span {font-size:1.3em;vertical-align:middle;}
#fg-stage.craft-game :is(.craft-reset,.fg-tictactoe-cell):focus-visible {outline:4px solid #402274;outline-offset:3px;}
html[data-classroom-playing] #fg-stage.craft-game #fg-reset[data-play-native-control] {display:block!important;}
html[data-classroom-game='tictactoe'] #classroom-play-toolbar [data-play-action='reset'] {display:none;}
html[data-classroom-game='tictactoe'] :is(#fg-result-modal,#fg-reset-confirm) .fg-modal {background:#fff9e9!important;border:4px solid #f4cd70!important;border-radius:24px!important;color:#503b50!important;}
html[data-classroom-game='tictactoe'] #fg-result-restart {width:100%;min-height:54px;aspect-ratio:3 / 1;border:0!important;border-radius:999px!important;background:#8939b9 url("../tictactoe-craft/button.cffcfb85bd05.webp") center / 100% 100% no-repeat!important;color:#fff;font-size:18px;font-weight:900;text-shadow:0 2px 2px #482366;}
#fg-stage.craft-game .craft-more {width:100%;margin:0;}
#fg-stage.craft-game .craft-more summary {width:min(100%,150px);min-height:44px;margin:auto;background:#fff9e9;color:#633a69;}
#fg-stage.craft-game.is-flipped #fg-turn-top {transform:none;}
@media(max-width:900px){
 #fg-stage.craft-game {padding:8px 10px 20px;}
 #fg-stage.craft-game .craft-layout {grid-template-columns:minmax(0,1fr);grid-template-areas:'title' 'board' 'sidebar';gap:8px;width:min(100%,600px);}
 #fg-stage.craft-game .craft-heading {width:min(75%,350px);}
 #fg-stage.craft-game .craft-heading h1 {font-size:clamp(30px,8vw,52px);}
 #fg-stage.craft-game .craft-sidebar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;}
 #fg-stage.craft-game .craft-notebook {grid-column:1 / -1;aspect-ratio:auto;min-height:90px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff5d5;border:3px solid #f6cc69;border-radius:18px;}
 #fg-stage.craft-game.craft-art-ready .craft-notebook {background-color:#fff5d5;background-image:none;}
 #fg-stage.craft-game .craft-players {position:static;width:44%;height:72px;gap:5px;}
 #fg-stage.craft-game .craft-current {position:static;flex:1;height:72px;flex-direction:row;gap:8px;background:#ffd8e6;border-radius:15px;}
 #fg-stage.craft-game .craft-current strong {font-size:clamp(16px,4vw,23px);}
 #fg-stage.craft-game .craft-current-mark {width:48px;height:54px;font-size:40px;}
 #fg-stage.craft-game .craft-reset {min-height:56px;font-size:clamp(18px,4vw,26px);}
 #fg-stage.craft-game .craft-more {align-self:center;}
}
@media(prefers-reduced-motion:reduce){#fg-stage.craft-game :is(.fg-board-grid,.fg-cell){transition:none!important;animation:none!important;}}
