/* Doodle Guard styles */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #e6dcc3;
  font-family: "Comic Sans MS", "Chalkboard SE", "Segoe Print", "Comic Neue", cursive, sans-serif;
  color: #4a3b20;
  user-select: none; -webkit-user-select: none;
}
#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#game {
  touch-action: none; background: #f8f1de;
  border-radius: 12px; cursor: crosshair;
  box-shadow: 0 8px 26px rgba(90, 70, 30, 0.28);
  max-width: 100%; max-height: 100%;
}

/* HUD */
#hud { position: fixed; top: 10px; right: 12px; display: flex; gap: 8px; z-index: 80; }
#lvlLabel {
  position: fixed; top: 12px; left: 14px; z-index: 30;
  font-size: 17px; padding: 5px 14px;
  background: rgba(255, 253, 244, 0.92);
  border: 3px solid #4a3b20; border-radius: 12px;
  display: none;
}
.icon-btn {
  width: 46px; height: 46px; font-size: 19px; font-family: inherit;
  background: #fffdf4; color: #4a3b20;
  border: 3px solid #4a3b20; border-radius: 12px;
  cursor: pointer; box-shadow: 3px 3px 0 rgba(74, 59, 32, 0.18);
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(0,0,0,0); }

/* draw bar */
#drawBar {
  position: fixed; left: 0; right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: none; justify-content: center; align-items: center; gap: 12px;
  z-index: 30; pointer-events: none;
}
#drawBar > * { pointer-events: auto; }
#hintText {
  background: rgba(255, 253, 244, 0.92);
  border: 3px solid #4a3b20; border-radius: 12px;
  padding: 6px 14px; font-size: 15px; max-width: 60vw; text-align: center;
}

/* buttons */
.doodle-btn {
  font-family: inherit; font-size: 20px; padding: 10px 28px;
  background: #fffdf4; color: #4a3b20;
  border: 3px solid #4a3b20; border-radius: 14px;
  cursor: pointer; box-shadow: 4px 4px 0 rgba(74, 59, 32, 0.18);
  transition: transform 0.06s;
}
.doodle-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(74, 59, 32, 0.18); }
.doodle-btn.big { font-size: 26px; padding: 14px 46px; }
.doodle-btn.small { font-size: 16px; padding: 7px 18px; }
.doodle-btn.go { background: #ffd23f; font-weight: bold; }

/* screens */
.screen {
  position: fixed; inset: 0; z-index: 50;
  display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background: rgba(248, 241, 222, 0.72);
  padding: 20px;
}
.screen.active { display: flex; }
.menu-title {
  font-size: clamp(44px, 9vw, 76px); color: #e5484d;
  text-shadow: 3px 3px 0 rgba(74, 59, 32, 0.22);
  letter-spacing: 1px;
  transform: rotate(-2deg);
}
.tagline { font-size: clamp(16px, 3vw, 21px); }
.howto { font-size: 14px; opacity: 0.75; margin-top: 10px; }
.panel {
  background: #fffdf4; border: 4px solid #4a3b20; border-radius: 20px;
  padding: 26px 34px; display: flex; flex-direction: column;
  gap: 12px; align-items: center;
  box-shadow: 8px 8px 0 rgba(74, 59, 32, 0.16);
  max-width: 92vw; max-height: 92vh; overflow: auto;
}
.panel.wide { gap: 16px; }
.panel h2 { font-size: 28px; }
#resultSub { font-size: 17px; opacity: 0.8; }

/* level grid */
#levelGrid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px; max-width: 480px;
}
.lvl-cell {
  width: 62px; height: 62px; font-family: inherit; font-size: 22px;
  background: #fffdf4; color: #4a3b20;
  border: 3px solid #4a3b20; border-radius: 14px;
  cursor: pointer; box-shadow: 3px 3px 0 rgba(74, 59, 32, 0.16);
}
.lvl-cell:active { transform: translate(2px, 2px); }
.lvl-cell.locked { opacity: 0.38; cursor: not-allowed; }
.lvl-cell.daily { background: #ffd23f; font-size: 26px; }

@media (max-width: 480px) {
  #levelGrid { grid-template-columns: repeat(5, 1fr); }
  .lvl-cell { width: 54px; height: 54px; font-size: 19px; }
}
