* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: #8ee7ff;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }
#app { position: fixed; inset: 0; }
#view, #fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#fx { z-index: 4; pointer-events: none; }
#menu {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 12px 72px;
  overflow: auto;
}
#menu-top, #knives, #levels { width: min(920px, 100%); }
#menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#knives {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
#levels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (min-width: 800px) {
  #levels { grid-template-columns: repeat(10, 1fr); }
}
button {
  font: inherit;
  font-weight: 800;
  color: #3b1464;
  background: #fff;
  border: 0;
  border-radius: 16px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 #e09ad4;
}
button:active { transform: translateY(2px); box-shadow: 0 2px 0 #e09ad4; }
button:disabled { cursor: default; opacity: 0.35; transform: none; }
#coins, #run-coins {
  font-weight: 800;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  color: #5a2a00;
}
#coins::before, #run-coins::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6b0, #ffbf1f 46%, #e08a00);
}
#btn-next {
  background: #7cffb2;
  font-size: 30px;
  min-width: 260px;
  padding: 18px 36px;
  box-shadow: 0 5px 0 #2e9d62;
}
#btn-reset {
  background: #ffd0dc;
  font-size: 22px;
  min-width: 260px;
  padding: 16px 28px;
}
.knife-btn {
  width: 92px;
  height: 70px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
}
.knife-btn canvas { width: 78px; height: 32px; }
.knife-btn small { font-size: 11px; line-height: 1; }
.knife-btn.sel { background: #fff3bf; outline: 3px solid #fff; }
.knife-btn.poor { opacity: 0.55; }
.lv {
  aspect-ratio: 1;
  padding: 0;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.94);
}
.lv.done { background: #b6ff7a; }
.lv.here { outline: 3px solid #fff; }
.lv.bonus { background: #ffd36b; }
#hud {
  position: absolute;
  z-index: 6;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  pointer-events: none;
}
#hud button, #hud #run-coins { pointer-events: auto; }
#run-coins {
  margin-left: auto;
  font-size: 26px;
  padding: 12px 18px;
}
#run-coins::before { content: none; display: none; }
#btn-hallo {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 8;
  font-size: 13px;
  padding: 6px 10px;
}
#codes {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 7;
  text-align: right;
  font-weight: 800;
  color: #4a1d6e;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  padding: 8px 10px;
  line-height: 1.4;
}
#pad {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(50, 0, 70, 0.35);
}
#pad-box {
  background: #fff6ea;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
#pad-msg {
  min-height: 28px;
  text-align: center;
  font-weight: 800;
  color: #d1004b;
  margin-bottom: 8px;
}
#pad-keys {
  display: grid;
  grid-template-columns: repeat(3, 68px);
  gap: 8px;
  justify-content: center;
}
#pad-keys button {
  height: 56px;
  font-size: 22px;
  background: #ffe27a;
  box-shadow: 0 4px 0 #e0a020;
}
#pad-keys button:empty, #pad-keys .blank {
  visibility: hidden;
  box-shadow: none;
}
