:root {
  --background: #f9f9f9;
  --cursor-color: #686868;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--background);
}

body {
  cursor: none;
  touch-action: none;
  font-family: Arial, Helvetica, sans-serif;
}

#life-grid {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: var(--background);
}

.logo-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}

.logo {
  width: clamp(224px, 36vw, 368px);
  height: auto;
  display: block;
}

.control-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: min(260px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(104, 104, 104, 0.22);
  border-radius: 8px;
  background: rgba(249, 249, 249, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  color: #2d2d2d;
  cursor: auto;
  backdrop-filter: blur(8px);
}

.control-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.control-panel button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #686868;
  border-radius: 6px;
  background: #f9f9f9;
  color: #2d2d2d;
  font: inherit;
  cursor: pointer;
}

.control-panel label {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
}

.control-panel label span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.control-panel output {
  color: #686868;
  font-variant-numeric: tabular-nums;
}

.control-panel input {
  width: 100%;
  accent-color: #32eeaa;
  cursor: pointer;
}

@media (max-width: 640px) {
  .control-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 42vh;
    overflow: auto;
  }
}
