#mg-nim.mg-shell { min-height:calc(100dvh - var(--classroom-play-height, 72px)); padding:14px 18px 26px; color:#653a2b; background:#f8d7bc url("../nim-cookie-village/bakery.0e1143f78554.webp") center / cover fixed; }
#mg-nim .mg-wrap { width:min(100%,1380px); max-width:1380px; }
#mg-nim .mg-play-head { margin:0; padding:0; min-height:0; }
html[data-classroom-playing] #mg-nim .mg-play-head { display:none; }
#mg-nim .mg-board-panel--nim, html[data-classroom-playing] #mg-nim .mg-board-panel--nim { position:relative; overflow:visible; display:flex; flex-direction:column; align-items:center; gap:12px; border:0; padding:12px 0 0; background:transparent; box-shadow:none; }
#mg-nim .mg-board-panel--nim::before { display:none; }
#mg-nim .cookie-heading { text-align:center; position:relative; z-index:2; }
#mg-nim .cookie-heading h2 { margin:0; color:#71402c; font-size:clamp(24px,2.6vw,38px); line-height:1.2; text-shadow:0 2px #fff8e7; }
#mg-nim .cookie-heading p { display:inline-block; margin:5px 0 0; padding:4px 14px; border-radius:999px; background:#fff8e7e8; color:#704b39; font-size:16px; font-weight:700; }
#mg-nim .cookie-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; position:relative; z-index:5; }
#mg-nim .cookie-options { position:relative; }
#mg-nim .cookie-options summary, #mg-nim .cookie-motion, #mg-nim #mg-nim-start, #mg-nim [data-mg-help-open] { min-height:44px; border:2px solid #e7b98f; border-radius:14px; padding:9px 15px; background:#fff9ed; color:#6d3d2a; font-size:15px; font-weight:800; cursor:pointer; box-shadow:0 3px 0 #bf895f; }
#mg-nim .cookie-options summary { list-style:none; }
#mg-nim .cookie-options summary::-webkit-details-marker { display:none; }
#mg-nim .cookie-options summary::after { content:' ▾'; }
#mg-nim .cookie-options[open] summary::after { content:' ▴'; }
#mg-nim .cookie-options-body { position:absolute; top:calc(100% + 7px); left:50%; transform:translateX(-50%); width:230px; padding:14px; border:2px solid #e7b98f; border-radius:16px; background:#fff9ed; box-shadow:0 10px 22px #653a2b40; }
#mg-nim .cookie-options-body fieldset { display:flex; flex-wrap:wrap; gap:9px; margin:0 0 10px; padding:0; border:0; }
#mg-nim .cookie-options-body legend { margin-bottom:8px; font-weight:800; }
#mg-nim .cookie-options-body label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
#mg-nim .cookie-options-body input { accent-color:#c56a64; }
#mg-nim .cookie-motion { width:100%; }
#mg-nim #mg-nim-start { background:#ee8c7b; border-color:#c96d5d; color:#512d23; }
#mg-nim .cookie-scene { position:relative; width:100%; max-width:1380px; padding:8px clamp(6px,1.5vw,20px) 0; }
#mg-nim .cookie-friend { position:absolute; z-index:1; top:-180px; width:clamp(130px,16vw,220px); height:auto; pointer-events:none; filter:drop-shadow(0 7px 5px #6d3d2a36); transform-origin:50% 95%; animation:nim-friend 3.6s ease-in-out infinite; }
#mg-nim .cookie-friend--bear { left:0; }
#mg-nim .cookie-friend--bunny { right:0; animation-delay:-1.8s; }
#mg-nim #mg-nim-piles { position:relative; z-index:2; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(8px,1.4vw,20px); min-height:0; width:100%; }
#mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { display:grid; grid-template-rows:auto minmax(clamp(210px,20vw,270px),1fr) auto; gap:5px; min-width:0; min-height:0; padding:9px 8px 12px; border:0; border-radius:20px; background:transparent; box-shadow:none; transform:none; overflow:visible; }
#mg-nim .mg-pile-head { position:relative; z-index:1; justify-content:center; align-items:center; gap:9px; color:#704127; font-weight:900; font-size:17px; }
#mg-nim .mg-pile-head span { background:#fff8e8ef; border-radius:999px; padding:5px 11px; white-space:nowrap; }
#mg-nim .mg-pile-head .cookie-move-label { background:#8a4c35; color:#fff; font-size:14px; white-space:nowrap; }
#mg-nim .mg-stones { display:flex; flex-wrap:wrap; justify-content:center; align-content:center; gap:0; min-height:clamp(210px,20vw,270px); padding:20px 15%; background:url("../nim-cookie-village/tray.d0aba67b44dc.webp") center / 100% 100% no-repeat; }
#mg-nim .mg-stone, #mg-nim .mg-stone:nth-child(n) { display:block; flex:0 0 31%; width:31%; height:auto; aspect-ratio:1; border:0; border-radius:0; background: url("../nim-cookie-village/cookie.01b43e1695a9.webp") center / 155% auto no-repeat; box-shadow:none; }
#mg-nim .mg-pile.is-selected .mg-stone { animation:nim-bounce .48s ease both; }
#mg-nim .mg-pile.is-ai-move .mg-stone { animation:nim-bounce .55s .1s ease both; }
#mg-nim .mg-take-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:0 3%; }
#mg-nim .mg-take, #mg-nim .mg-take-row span { min-width:44px; min-height:68px; border:0; border-radius:12px; padding:4px; background:transparent url("../nim-cookie-village/button.24b60ea83ff4.webp") center / 100% 100% no-repeat; color:#743c2c; font-size:27px; line-height:1; font-weight:900; box-shadow:none; text-shadow:0 1px #fff; }
#mg-nim .mg-take:disabled { opacity:.48; filter:grayscale(.55); }
#mg-nim .mg-take:hover:not(:disabled) { transform:none; box-shadow:none; }
#mg-nim .mg-take:active:not(:disabled) { transform:translateY(2px); }
#mg-nim .mg-status-row { display:flex; flex-direction:column; justify-content:center; min-height:0; margin:0; text-align:center; gap:4px; }
#mg-nim .mg-status-row .mg-status { margin:0; padding:6px 22px; border:2px solid #e8a98d; border-radius:999px; background:#fff8e9; color:#713e2b; font-size:18px; font-weight:900; }
#mg-nim .mg-status-row .mg-thought { margin:0; padding:3px 10px; border-radius:9px; background:#fff8e9ed; color:#71432e; font-size:14px; }
#mg-nim .mg-status-row .mg-thought:empty { display:none; }
#mg-nim [data-game-result-style] { position:relative; z-index:4; width:min(100%,560px); border:2px solid #e7b98f!important; background:#fff8e9!important; color:#713e2b!important; }
#mg-nim [data-game-result-style] [data-result-part="title"] { color:#713e2b!important; }
#mg-nim [data-game-result-style] [data-result-part="symbol"] { color:#d47d67; }
#mg-nim [data-game-result-style] [data-result-part="primary"] { min-height:56px!important; border:0!important; background:transparent url("../nim-cookie-village/button.24b60ea83ff4.webp") center / 100% 180% no-repeat!important; color:#713e2b!important; font-weight:900!important; }
#mg-nim :is(button,summary,input,a):focus-visible { outline:3px solid #803a31; outline-offset:3px; }
#mg-nim[data-motion=off] *, #mg-nim[data-motion=off] *::before, #mg-nim[data-motion=off] *::after { animation:none!important; transition:none!important; }
@media (prefers-reduced-motion:reduce) { #mg-nim *, #mg-nim *::before, #mg-nim *::after { animation:none!important; transition:none!important; } }
@keyframes nim-friend { 0%,100% { transform:rotate(-2deg); } 50% { transform:rotate(2deg) translateY(-4px); } }
@keyframes nim-bounce { 0% { transform:scale(.78) translateY(6px); opacity:.5; } 65% { transform:scale(1.08) translateY(-4px); opacity:1; } 100% { transform:none; opacity:1; } }
@media (max-width:700px) {
  #mg-nim.mg-shell { background-attachment:scroll; padding:8px 12px 20px; }
  #mg-nim .cookie-heading h2 { font-size:24px; }
  #mg-nim .cookie-heading p { font-size:14px; }
  #mg-nim .cookie-scene { max-width:600px; padding:0; }
  #mg-nim .cookie-friend { display:none; }
  #mg-nim #mg-nim-piles { grid-template-columns:1fr; gap:5px; }
  #mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { grid-template-columns:58px minmax(0,1fr) 150px; grid-template-rows:auto; align-items:center; gap:2px; padding:3px 6px; border:2px solid #e9bf94; border-radius:18px; background:#fff8e8e8; }
  #mg-nim .mg-pile-head { flex-direction:column; gap:2px; font-size:14px; }
  #mg-nim .mg-pile-head span { padding:2px 4px; background:transparent; }
  #mg-nim .mg-pile-head .cookie-move-label { background:#8a4c35; padding:2px 4px; font-size:14px; }
  #mg-nim .mg-stones { min-height:88px; padding:12px 13%; }
  #mg-nim .mg-take-row { gap:2px; padding:0; }
  #mg-nim .mg-take, #mg-nim .mg-take-row span { min-width:44px; min-height:52px; font-size:19px; }
}
@media (max-width:390px) {
  #mg-nim.mg-shell { padding-left:6px; padding-right:6px; }
  #mg-nim .mg-board-panel--nim { gap:7px; }
  #mg-nim .cookie-heading h2 { font-size:21px; }
  #mg-nim .cookie-heading p { margin-top:3px; padding:3px 8px; font-size:14px; }
  #mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { grid-template-columns:43px minmax(0,1fr) 141px; }
  #mg-nim .mg-stones { min-height:76px; }
  #mg-nim .mg-take, #mg-nim .mg-take-row span { min-width:44px; min-height:48px; }
}

/* Cookie-village controls: the generated key has the same near-square
   proportions as the approved concept, with real, accessible text on top. */
html[data-classroom-game="nim"] #classroom-play-toolbar { background:#fff0e6; border-bottom:2px solid #e9c5a5; }
html[data-classroom-game="nim"] #classroom-play-toolbar h1 { color:#592253; }
html[data-classroom-game="nim"] #classroom-play-toolbar h1::before { content:""; display:block; flex:0 0 40px; width:40px; height:40px; background:url("../nim-cookie-village/cookie.01b43e1695a9.webp") center / 150% auto no-repeat; }
html[data-classroom-game="nim"] #classroom-play-toolbar nav :is(button,a) { border:0; background:transparent url("../nim-cookie-village/wide-button.f347b372ab43.webp") center / 100% 100% no-repeat; color:#551c55; font-weight:850; }
html[data-classroom-game="nim"] #classroom-play-toolbar nav :is(button,a):hover { background-color:transparent; color:#38103b; filter:brightness(1.04); }
html[data-classroom-game="nim"] #classroom-play-toolbar nav :is(button,a):active { transform:translateY(2px); }
html[data-classroom-game="nim"] #classroom-play-toolbar nav :is(button,a):focus-visible { outline:3px solid #52245d; outline-offset:3px; }
#mg-nim .cookie-options summary, #mg-nim #mg-nim-start { border:0; background:transparent url("../nim-cookie-village/wide-button.f347b372ab43.webp") center / 100% 100% no-repeat; color:#551c55; box-shadow:none; }
#mg-nim .cookie-options summary { padding:11px 19px; }
#mg-nim #mg-nim-start { padding:11px 22px; }
#mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { isolation:isolate; grid-template-rows:auto minmax(clamp(165px,16vw,225px),1fr) auto; gap:0; padding:9px 8px 28px; }
#mg-nim .mg-pile::before { content:""; position:absolute; z-index:-1; inset:36px 0 0; background:url("../nim-cookie-village/play-tray.852f4aaa830d.webp") center / 100% 100% no-repeat; pointer-events:none; }
#mg-nim .mg-pile-head { z-index:1; }
#mg-nim .mg-stones { position:relative; z-index:1; min-height:clamp(165px,16vw,225px); padding:12px 16% 0; background:none; }
#mg-nim .mg-take-row { position:relative; z-index:1; align-items:center; justify-items:center; gap:4px; padding:0 11%; }
#mg-nim .mg-take, #mg-nim .mg-take-row span { display:inline-flex; align-items:center; justify-content:center; width:min(100%,108px); min-width:44px; min-height:44px; aspect-ratio:1; padding:0 0 5%; background:transparent url("../nim-cookie-village/number-button.6f4a7e59e586.webp") center / 100% 100% no-repeat; color:#57134d; font-size:clamp(25px,3.2vw,42px); line-height:1; }
#mg-nim .mg-take:disabled { opacity:.78; filter:grayscale(1); color:#5c4d52; }
#mg-nim [data-game-result-style] [data-result-part="primary"] { width:min(100%,260px)!important; max-width:260px!important; min-height:64px!important; background:transparent url("../nim-cookie-village/wide-button.f347b372ab43.webp") center / 100% 100% no-repeat!important; color:#551c55!important; font-size:18px!important; }
@media (max-width:700px) {
  #mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { grid-template-rows:auto; padding:5px 7px; border:0; background:transparent; }
  #mg-nim .mg-pile::before { inset:0; border:3px solid #b46e36; border-radius:17px; background:#f6d58e url("../nim-cookie-village/play-tray.852f4aaa830d.webp") center 58% / 150% auto no-repeat; box-shadow:inset 0 0 0 2px #eac080; }
  #mg-nim .mg-pile-head span { background:#fff8e8ed; }
  #mg-nim .mg-pile-head .cookie-move-label { background:#8a4c35; }
  #mg-nim .mg-stones { min-height:88px; padding:8px 5%; }
  #mg-nim .mg-take-row { padding:0; gap:2px; }
  #mg-nim .mg-take, #mg-nim .mg-take-row span { width:min(100%,52px); min-width:44px; min-height:44px; font-size:23px; }
}
@media (max-width:390px) {
  #mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { grid-template-columns:43px minmax(0,1fr) 141px; }
  #mg-nim .mg-stones { min-height:76px; }
  #mg-nim .mg-take, #mg-nim .mg-take-row span { width:44px; min-height:44px; font-size:22px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar h1::before { flex-basis:32px; width:32px; height:32px; }
  html[data-classroom-playing] #mg-nim.mg-shell { padding-top:6px!important; }
}

/* The Nim header follows the approved cookie-village artwork. The labels
   remain real text and the decorative icons are hidden from assistive tech. */
html[data-classroom-game="nim"] #classroom-play-toolbar {
  min-height:0; padding:8px 20px; border:0;
  background:#b86b42 url("../nim-cookie-village/bakery.0e1143f78554.webp") center top / 100vw auto no-repeat;
}
html[data-classroom-game="nim"] #classroom-play-toolbar [data-play-part="inner"] { max-width:none; gap:16px; }
html[data-classroom-game="nim"] #classroom-play-toolbar h1 {
  position:relative; flex:0 1 clamp(250px,29vw,410px); width:clamp(250px,29vw,410px); height:68px;
  min-height:68px; max-width:410px; padding:0 15px 4px 72px; margin:0;
  background:transparent url("../nim-cookie-village/title-plaque.754f38940c00.webp") center / 100% 150% no-repeat;
  color:#50134f; font-size:clamp(22px,2.8vw,40px); font-weight:900; white-space:nowrap; overflow:visible;
}
html[data-classroom-game="nim"] #classroom-play-toolbar h1::before {
  position:absolute; left:0; top:50%; transform:translateY(-50%); width:72px; height:72px;
  background:url("../nim-cookie-village/cookie.01b43e1695a9.webp") center / 150% auto no-repeat;
}
html[data-classroom-game="nim"] #classroom-play-toolbar nav { gap:10px; height:68px; }
html[data-classroom-game="nim"] #classroom-play-toolbar nav :is(button,a) {
  display:inline-flex; flex:0 0 auto; gap:7px; align-items:center; justify-content:center;
  width:clamp(128px,11.4vw,170px); height:68px; min-height:68px; padding:0 9px 7px;
  background:transparent url("../nim-cookie-village/nav-button.b95656727812.webp") center / 100% 100% no-repeat;
  color:#50134f; font-size:clamp(16px,1.7vw,24px); font-weight:900; border:0;
}
html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon { display:inline-flex; flex:none; align-items:center; justify-content:center; color:#8b298e; }
html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon--help { width:29px; height:29px; border:3px solid currentColor; border-radius:50%; font:900 21px/1 system-ui,sans-serif; }
html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon--reset { width:34px; height:34px; font:900 38px/.8 system-ui,sans-serif; }
html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon--list {
  width:31px; height:29px;
  background:radial-gradient(circle,#8b298e 2.5px,transparent 3px) left 3px top 3px / 6px 6px no-repeat,
    radial-gradient(circle,#8b298e 2.5px,transparent 3px) left 3px center / 6px 6px no-repeat,
    radial-gradient(circle,#8b298e 2.5px,transparent 3px) left 3px bottom 3px / 6px 6px no-repeat,
    linear-gradient(#8b298e,#8b298e) right 2px top 5px / 19px 4px no-repeat,
    linear-gradient(#8b298e,#8b298e) right 2px center / 19px 4px no-repeat,
    linear-gradient(#8b298e,#8b298e) right 2px bottom 5px / 19px 4px no-repeat;
}
@media (max-width:600px) {
  html[data-classroom-game="nim"] #classroom-play-toolbar { padding:4px 8px; background-size:auto 320px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar [data-play-part="inner"] { gap:2px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar h1 { width:228px; max-width:100%; height:46px; min-height:46px; padding:0 8px 4px 48px; font-size:20px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar h1::before { width:50px; height:50px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar nav { width:100%; height:48px; gap:4px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar nav :is(button,a) { flex:1 1 0; width:0; min-width:0; height:48px; min-height:48px; padding:0 2px 5px; gap:4px; font-size:14px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon--help { width:20px; height:20px; border-width:2px; font-size:14px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon--reset { width:23px; height:24px; font-size:27px; }
  html[data-classroom-game="nim"] #classroom-play-toolbar .cookie-nav-icon--list { width:21px; height:22px; background-size:5px 5px,5px 5px,5px 5px,13px 3px,13px 3px,13px 3px; }
}

/* The current turn is the central sign in the approved scene. */
#mg-nim .cookie-heading { order:2; }
#mg-nim .cookie-friend { top:-128px; }
#mg-nim .cookie-heading h2 { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#mg-nim .cookie-heading p { margin:0; font-size:14px; }
#mg-nim .cookie-tools { order:0; position:absolute; left:12px; top:10px; }
#mg-nim:not([data-game-started]) .cookie-tools { flex-direction:column; align-items:flex-start; }
#mg-nim .mg-status-row { order:1; }
#mg-nim .cookie-scene { order:3; }
#mg-nim [data-game-result-style] { order:4; }
#mg-nim .mg-status-row .mg-status {
  display:flex; align-items:center; justify-content:center; box-sizing:border-box;
  width:clamp(240px,27vw,370px); min-height:clamp(110px,12vw,164px); padding:28px 30px 0;
  border:0; border-radius:0; background:transparent url("../nim-cookie-village/turn-sign.2b7e627bd5fb.webp") center / 100% 100% no-repeat;
  color:#50134f; font-size:clamp(24px,2.8vw,40px); line-height:1.3; text-align:center;
}
#mg-nim.is-error .mg-status-row .mg-status { font-size:clamp(15px,1.5vw,20px); overflow-wrap:anywhere; }
@media (min-width:701px) and (max-width:1100px) {
  #mg-nim:not([data-game-started]) .cookie-friend--bear { left:clamp(115px,17vw,190px); }
}
@media (max-width:700px) {
  #mg-nim .cookie-heading { order:0; }
  #mg-nim .cookie-heading h2 { position:static; width:auto; height:auto; padding:0; margin:0; overflow:visible; clip:auto; white-space:normal; }
  #mg-nim .cookie-heading p { margin:3px 0 0; }
  #mg-nim .cookie-tools { order:1; position:relative; left:auto; top:auto; }
  #mg-nim:not([data-game-started]) .cookie-tools { flex-direction:row; align-items:center; }
  #mg-nim .mg-status-row { order:2; }
  #mg-nim .mg-status-row .mg-status { width:auto; min-height:0; padding:6px 22px; border:2px solid #e8a98d; border-radius:999px; background:#fff8e9; color:#713e2b; font-size:18px; }
  #mg-nim.is-error .mg-status-row .mg-status { font-size:15px; }
}

/* Concept-fidelity adjustment: badge, current turn and characters. */
@media (min-width:701px) {
  #mg-nim .mg-board-panel--nim { gap:4px; padding-top:3px; }
  #mg-nim .mg-status-row .mg-status {
    width:clamp(320px,34vw,475px); min-height:clamp(145px,15vw,210px);
    padding:42px 55px 0; font-size:clamp(38px,4.3vw,62px); line-height:1.3;
  }
  #mg-nim.is-error .mg-status-row .mg-status { font-size:clamp(15px,1.6vw,22px); }
  #mg-nim .cookie-scene { padding-top:0; }
  #mg-nim .cookie-friend { width:clamp(220px,23vw,340px); top:-210px; }
  #mg-nim .cookie-friend--bear { left:5%; }
  #mg-nim .cookie-friend--bunny { right:4%; }
  #mg-nim .mg-pile, #mg-nim .mg-pile.is-ai-move, #mg-nim .mg-pile.is-selected { padding:0 8px 28px; }
  #mg-nim .mg-pile::before { inset:48px 0 0; }
  #mg-nim .mg-pile-head {
    display:flex; position:relative; width:clamp(185px,20vw,290px); height:clamp(58px,6vw,82px);
    margin:0 auto -8px; gap:0; flex-direction:row; align-items:center; justify-content:flex-start;
    background:transparent url("../nim-cookie-village/pile-label.288119d3fb63.webp") center / 100% 130% no-repeat;
  }
  #mg-nim .mg-pile-head span:not(.cookie-move-label) { display:flex; align-items:center; justify-content:center; flex:0 0 44%; height:100%; padding:0 0 3%; border-radius:0; background:transparent; font-size:clamp(25px,3vw,42px); line-height:1.3; color:#50134f; text-shadow:0 1px #fff; }
  #mg-nim .mg-pile-head span:nth-child(2) { flex-basis:50%; color:#fff; font-size:clamp(23px,2.5vw,36px); text-shadow:0 2px 2px #4c2059; }
  #mg-nim .mg-pile-head .cookie-move-label { position:absolute; top:70%; right:-8%; padding:2px 8px; border-radius:9px; font-size:14px; }
  #mg-nim .mg-take, #mg-nim .mg-take-row span { width:min(100%,120px); font-size:clamp(28px,3.5vw,48px); }
}
@media (min-width:701px) and (max-width:1100px) {
  #mg-nim:not([data-game-started]) .cookie-friend--bear { left:clamp(110px,14vw,165px); }
  #mg-nim .cookie-friend { width:clamp(190px,23vw,250px); top:-145px; }
}
@media (max-width:700px) {
  #mg-nim .mg-pile-head { gap:2px; }
  #mg-nim .mg-pile-head span:not(.cookie-move-label) { color:#50134f; font-size:15px; font-weight:900; line-height:1.3; }
  #mg-nim .mg-pile-head span:nth-child(2) { background:#73358d; color:#fff; padding:1px 5px; }
}

@media (min-width:701px) {
  #mg-nim .mg-pile:nth-child(2)::before { background-image:url("../nim-cookie-village/play-tray-pink.49cd03cd80b1.webp"); }
  #mg-nim .mg-pile:nth-child(3)::before { background-image:url("../nim-cookie-village/play-tray-green.e8c94de538bb.webp"); }
}
@media (max-width:700px) {
  #mg-nim .mg-status-row .mg-status {
    display:flex; align-items:center; justify-content:center; box-sizing:border-box;
    width:220px; min-height:86px; padding:21px 24px 0; border:0; border-radius:0;
    background:transparent url("../nim-cookie-village/turn-sign.2b7e627bd5fb.webp") center / 100% 100% no-repeat;
    color:#50134f; font-size:26px; line-height:1.3;
  }
  #mg-nim.is-error .mg-status-row .mg-status { font-size:14px; }
}
