@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 8px;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  background: white;
  color: black;
}

body,
button,
.stage,
.stage img,
h1 {
  user-select: none;
  -webkit-user-select: none;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 28px;
  white-space: nowrap;
}

h1 {
  position: relative;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

#home-button {
  cursor: pointer;
}

#home-button:hover {
  text-decoration: underline;
}

.title-note {
  display: none;
  position: fixed;
  top: 40px;
  left: 8px;
  width: 420px;
  padding: 12px;
  background: white;
  border: 1px solid black;
  line-height: 1.5;
  font-weight: 400;
  z-index: 99999;
  white-space: normal;
}

#home-button:hover .title-note {
  display: block;
}

nav,
.dish-counts {
  display: flex;
  gap: 10px;
}

button {
  font-family: inherit;
  font-size: 14px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button::before {
  content: "○";
  margin-right: 4px;
}

button.is-active::before {
  content: "●";
}

button:hover {
  text-decoration: underline;
}

.tray-tools {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

#collect-button::before,
#clear-tray-button::before,
#tray-button::before,
.dish-counts button::before {
  content: "";
  margin: 0;
}

.dish-counts {
  display: none;
}

body.is-dish .dish-counts {
  display: flex;
  align-items: center;
}

#clear-tray-button {
  display: none;
}

body.is-tray #clear-tray-button {
  display: inline;
}

.stage {
  position: relative;
  width: 100%;
  height: calc(100vh - 40px);
  overflow: hidden;
}

.stage img {
  position: absolute;
  max-width: 180px;
  mix-blend-mode: multiply;
  z-index: 1;
}

.saved img {
  opacity: .6;
}

body.is-dish .stage {
  display: grid;
  gap: 1px;
}

body.is-dish .stage img {
  position: static;
  width: auto;
  height: auto;
  object-fit: contain;
  place-self: center;
}

body.is-dish .stage[data-count="1"] img {
  max-width: 45vw;
  max-height: 55vh;
}

body.is-dish .stage[data-count="2"] img {
  max-width: 32vw;
  max-height: 50vh;
}

body.is-dish .stage[data-count="4"] img {
  max-width: 24vw;
  max-height: 36vh;
}

body.is-dish .stage[data-count="8"] img {
  max-width: 18vw;
  max-height: 30vh;
}

body.is-tray .stage {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
  overflow: auto;
  padding-top: 12px;
}

body.is-tray .stage img {
  position: static;
  max-width: 160px;
  max-height: 160px;
  object-fit: contain;
  cursor: zoom-in;
}

.solo {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: white;
  z-index: 999;
}

.solo.is-open {
  display: grid;
}

.solo img {
  max-width: 70vw;
  max-height: 70vh;
  object-fit: contain;
}