/* ---------- Snake (XP-era casual game look) ---------- */
.sn-window .window-content.sn-root {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0 3px 3px;
  width: auto;
  overflow: hidden;
  background: #ece9d8;
  font: 11px Tahoma, "Segoe UI", sans-serif;
  position: relative;
  user-select: none;
}
.sn-menubar { border-bottom: 1px solid #d4d0c8; }

.sn-frame {
  margin: 6px auto;
  padding: 6px;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #fff #808080 #808080 #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sn-hud, .sn-board {
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}
.sn-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 5px;
}
.sn-led {
  position: relative;
  background: #000;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 1px 3px;
  font: bold 22px/22px "Courier New", monospace;
  letter-spacing: 1px;
}
.sn-led-bg { color: #3a0000; }
.sn-led-fg {
  position: absolute;
  left: 3px; top: 1px;
  color: #ff1a1a;
  text-shadow: 0 0 4px rgba(255, 30, 30, 0.7);
}
.sn-face {
  width: 28px; height: 28px;
  min-width: 0; min-height: 0;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #c0c0c0 !important;
  border: 2px solid !important;
  border-color: #fff #808080 #808080 #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.sn-face:active { border-color: #808080 #fff #fff #808080 !important; }
.sn-face:active canvas { transform: translate(1px, 1px); }

.sn-board { position: relative; line-height: 0; }
.sn-canvas { display: block; width: 320px; height: 320px; image-rendering: auto; }

.sn-overlay {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  line-height: normal;
}
.sn-overlay.show { display: flex; }

.sn-logo {
  font: italic bold 52px "Trebuchet MS", Tahoma, sans-serif;
  color: #fff;
  letter-spacing: -1px;
  background: linear-gradient(#ffe94d, #ff9c00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #9a4d00) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4));
}

.sn-btn { min-width: 86px; }

.sn-status {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 2px 6px;
  border-top: 1px solid #aca899;
  box-shadow: inset 0 1px #fff;
  color: #000;
}
.sn-status-len { border-left: 1px solid #aca899; padding-left: 8px; }

.sn-dpad { display: none; }
@media (pointer: coarse) {
  .sn-dpad {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(2, 36px);
    grid-template-areas: ". up ." "left down right";
    gap: 4px;
    justify-content: center;
    margin-bottom: 6px;
  }
  .sn-dpad button { min-width: 0; font-size: 14px; }
  .sn-dpad [data-dir="up"] { grid-area: up; }
  .sn-dpad [data-dir="left"] { grid-area: left; }
  .sn-dpad [data-dir="down"] { grid-area: down; }
  .sn-dpad [data-dir="right"] { grid-area: right; }
}
