html,
body {
  background-color: #fff;
  font-family: "Helvetica", "Arial", "Verdana", sans-serif;
  margin: 0;
  padding: 0;
}

.app-container {
  max-width: 100%;
  overflow: hidden;
}

.header {
  background-color: #369;
  padding: 10px 0;
}

.header > h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  margin: 0;
  text-align: center;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 20px auto;
  width: 352px;
}

.row {
  display: flex;
  gap: 2px;
  height: 48px;
}

.row > div {
  background-color: #ccc;
  border-radius: 4px;
  display: block;
  float: left;
  height: 48px;
  position: relative;
  width: 48px;
}

.row > .empty {
  background-color: transparent;
}

.row > .vertical {
  margin-left: 10px;
  margin-right: 10px;
  width: 28px;
}

.row > .horizontal {
  height: 28px;
  margin-bottom: 10px;
  margin-top: 10px;
}

.row > .orange,
.row > .lime {
  cursor: pointer;
}

.row > .orange:hover:after {
  background-color: #fa4;
}

.row > .lime:hover:after {
  background-color: #9e3;
}

.row > .orange:after,
.row > .lime:after {
  border: 1px solid #0005;
  content: "";
  position: absolute;
}

.down.orange:after {
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
}

.up.orange:after {
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

.rightward.lime:after {
  border-bottom-right-radius: 50%;
  border-top-right-radius: 50%;
}

.leftward.lime:after {
  border-bottom-left-radius: 50%;
  border-top-left-radius: 50%;
}

.row > .orange:after {
  background-color: #f93;
  bottom: 2px;
  left: 50%;
  margin-left: -12px;
  top: 2px;
  width: 22px;
}

.row > .lime:after {
  background-color: #8d2;
  height: 22px;
  left: 2px;
  margin-top: -12px;
  right: 2px;
  top: 50%;
}

.row > .suggested {
  background-color: #69b;
}

.row > .suggested:after {
  border-color: #fff5;
}

.pips-left,
.pips-right,
.pips-top,
.pips-bottom {
  position: absolute;
}

.top .pips-left,
.top .pips-right {
  top: 8px;
}

.bottom .pips-left,
.bottom .pips-right {
  bottom: 8px;
}

.left .pips-top,
.left .pips-bottom {
  left: 8px;
}

.right .pips-top,
.right .pips-bottom {
  right: 8px;
}

.pips-left {
  left: -8px;
}

.pips-right {
  right: -8px;
}

.pips-top {
  top: -8px;
}

.pips-bottom {
  bottom: -8px;
}

.left .pips-top .pip,
.left .pips-bottom .pip {
  float: left;
}

.right .pips-top .pip,
.right .pips-bottom .pip {
  float: right;
}

.pip {
  background-color: #bbb;
  border-radius: 3px;
  height: 5px;
  margin: 2px;
  width: 5px;
}

.depth-gauge {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
  margin: 24px auto;
  user-select: none;
  font-size: 18px;
}

.number-control {
  align-items: center;
  border-radius: 6px;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  overflow: hidden;
  user-select: none;
}

.number-control .up,
.number-control .down {
  background: #e5e5e5;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  width: 100%;
}

.number-control .up:hover,
.number-control .down:hover {
  background: #f0f0f0;
}

.number-control .up:active,
.number-control .down:active {
  background: #ddd;
}

.number-control .depth {
  padding: 5px;
  font-size: 24px;
  font-weight: bold;
  background: white;
  width: 100%;
  text-align: center;
}

.thinker {
  background: #999;
  border-radius: 50%;
  height: 42px;
  opacity: 0.5;
  overflow: hidden;
  position: relative;
  transform: scale(1);
  transition: opacity 0.6s ease, transform 0.6s ease;
  width: 42px;
}

.thinker::before {
  animation: swirl 3s linear infinite;
  background: conic-gradient(from 0deg, #369, #147, #69b, #369);
  border-radius: 50%;
  content: "";
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
  position: absolute;
  transform: rotate(0deg);
  transition: opacity 0.6s ease;
  z-index: 0;
}

.thinker::after {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.2),
    transparent 50%
  );
  border-radius: 50%;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.thinker:not(.active)::before {
  animation-play-state: paused;
  opacity: 0;
}

.thinker.active {
  animation: pulse 3s ease-in-out infinite;
  background: #369;
  opacity: 1;
  transform: scale(1.05);
}

@keyframes swirl {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1.05);
  }
  50% {
    transform: scale(1.15);
  }
}

.undo {
  background: #e5e5e5;
  border-radius: 50%;
  border: 1px solid #bbb;
  cursor: pointer;
  font-size: 20px;
  height: 31px;
  line-height: 31px;
  text-align: center;
  width: 31px;
}

.undo:hover {
  background: #f0f0f0;
}

.undo:active {
  background: #ddd;
}
