:root {
  color-scheme: dark;
  --ink: #fff8e7;
  --muted: #d5c7ae;
  --line: rgba(255, 248, 231, 0.18);
  --panel: rgba(34, 25, 24, 0.9);
  --mint: #78e0b5;
  --butter: #ffd66b;
  --berry: #ff5e9e;
  --toast: #9a5b32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(45, 31, 24, 0.58), rgba(24, 19, 20, 0.94)),
    url("https://images.unsplash.com/photo-1525351484163-7529414344d8?auto=format&fit=crop&w=1800&q=80") center / cover fixed;
}

button,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

button {
  min-height: 44px;
  padding: 0.72rem 0.9rem;
  color: var(--ink);
  background: #3b2c2b;
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  border-color: var(--butter);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--butter);
}

.primary {
  color: #241714;
  background: linear-gradient(135deg, var(--butter), var(--mint));
}

.pancakeApp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 14px;
}

.griddle {
  min-width: 0;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #201716;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  touch-action: none;
}

.pancakeControls {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
}

.sideHeader,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.panel {
  display: grid;
  gap: 10px;
}

.panel button {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.kicker {
  margin: 0 0 6px;
  color: var(--butter);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.45rem;
  line-height: 1.05;
}

h2 {
  font-size: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.42;
}

h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

label span {
  color: var(--butter);
}

.scoreStrip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scoreStrip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.58rem 0.64rem;
  color: var(--muted);
  background: rgba(24, 19, 20, 0.76);
}

.scoreStrip strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
}

.storePanel {
  background:
    linear-gradient(145deg, rgba(255, 214, 107, 0.12), rgba(120, 224, 181, 0.07)),
    var(--panel);
}

.saveStatus {
  font-size: 0.9rem;
}

.shopGroup {
  display: grid;
  gap: 8px;
}

.skinGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.panel .skinCard {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 136px;
  padding: 12px 8px;
  color: var(--ink);
  background: rgba(24, 19, 20, 0.72);
}

.panel .skinCard[aria-pressed="true"] {
  border-color: var(--butter);
  box-shadow: 0 0 0 2px rgba(255, 214, 107, 0.22);
}

.panel .skinCard span {
  display: block;
  width: 100%;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.12;
  text-align: center;
}

.panel .skinCard small {
  color: var(--butter);
  font-size: 0.76rem;
  line-height: 1;
}

.panel .skinCard.locked {
  border-color: rgba(255, 248, 231, 0.1);
}

.panel .skinCard.locked .skinSample {
  filter: saturate(0.72);
  opacity: 0.78;
}

.skinSample {
  position: relative;
  width: 104px;
  height: 70px;
}

.skinPancake {
  position: absolute;
  left: 10px;
  top: 14px;
  width: 84px;
  height: 48px;
  border: 2px solid var(--edge);
  border-radius: 48% 52% 45% 55%;
  background:
    radial-gradient(circle at 32% 26%, var(--highlight), transparent 22%),
    radial-gradient(circle at 58% 62%, var(--spot), transparent 11%),
    radial-gradient(circle at 35% 62%, var(--spot), transparent 8%),
    linear-gradient(135deg, var(--light), var(--mid) 58%, var(--dark));
  box-shadow:
    0 0 20px var(--aura, rgba(255, 214, 107, 0.25)),
    0 7px 14px rgba(0, 0, 0, 0.28);
}

.skinPancake::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 11px;
  width: 18px;
  height: 12px;
  border-radius: 3px;
  background: var(--topping);
}

.skinPancake::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 24px;
  width: 9px;
  height: 6px;
  border-radius: 50%;
  background: var(--spot);
  box-shadow:
    28px 8px 0 var(--spot),
    45px -5px 0 var(--spot);
}

.skinPad {
  position: absolute;
  left: 5px;
  top: 23px;
  width: 94px;
  height: 30px;
  border: 3px solid var(--stroke);
  border-radius: 15px;
  background: var(--base);
  box-shadow: 0 0 14px var(--glow);
}

.skinPad::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 9px;
  width: 64px;
  height: 8px;
  border-radius: 999px;
  background: var(--stripe);
}

@media (max-width: 880px) {
  body {
    overflow: auto;
  }

  .pancakeApp {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100dvh;
  }

  canvas {
    height: min(62vh, 560px);
  }
}
