.tw-module-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.module-picker {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(38px, max-content);
  align-items: start;
  justify-content: start;
  gap: 0 8px;
  width: max-content;
  min-width: max-content;
}

.module-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 38px;
}

.module-picker-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.module-palette-scroll {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.module-palette-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.module-palette-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.module-palette-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.tw-module-tile {
  user-select: none;
  width: 100%;
}

.tw-module-box {
  position: relative;
  display: flex;
  width: 30px;
  height: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #1e293b;
  font-size: 9px;
  font-weight: 400;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 1px rgba(15, 23, 42, 0.05);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    opacity 120ms ease;
}

.tw-module-box span {
  display: inline-block;
}

.tw-module-box--interactive:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(15, 23, 42, 0.10);
}

.tw-module-box--palette {
  cursor: pointer;
}

.tw-module-box--clickable {
  cursor: pointer;
}

.tw-module-radio:checked + .tw-module-tile .tw-module-box {
  border-color: #dc2626;
  outline: 3px solid #dc2626;
  outline-offset: 0px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(220, 38, 38, 0.10);
}

.tw-module-tone-blue {
  color: #1d4ed8;
}

.tw-module-tone-red {
  color: #b91c1c;
}

.tw-module-label {
  font-size: 10px;
  line-height: 1.1;
  color: #64748b;
  letter-spacing: -0.1px;
  font-weight: 700;
  text-align: center;
  vertical-align: top;
  width: 100%;
  min-width: 0;
}

.tw-module-disabled {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border-radius: 4px;
  background: #e5e7eb;
}

.tw-module-simple {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;
  margin: 0 auto;

  font-size: 9px;
  text-align: center;

  border: 0.5px solid gray;
  border-radius: 4px;
}

.tw-module-simple--clickable {
  cursor: pointer;
}

.tw-module-simple--blue {
  color: #1d4ed8;
}

.tw-module-simple--red {
  color: #b91c1c;
}

.tw-module-box,
.tw-module-simple,
.tw-module-disabled {
  flex-shrink: 0;
}