#omg-header {
  z-index: 450;
}

/* core.css is shared across other projects, so the theme-picker's swatch
   styling stays untouched there -- this overrides it to render icons
   (sun/moon/spiral, same set as react-morph-charts' ThemeToggle) instead of
   plain colored circles, without needing to edit the shared file. */
#omg-theme-picker {
  gap: 2px;
}
#omg-theme-picker > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: none;
  color: currentColor;
  opacity: 0.75;
}
#omg-theme-picker > a:hover {
  opacity: 1;
}
#omg-theme-picker > a.selected {
  opacity: 1;
}

/* GitHub link, just below the theme toggle */
#omg-github {
  position: absolute;
  top: 34px;
  right: 4px; /* centred under the last toggle icon */
  margin-top: 12px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: none;
  opacity: 0.75;
}
#omg-github svg {
  width: 30px; /* same size in every theme (the themes' generic svg rule differs) */
  height: 30px;
}
html[data-theme="evol-blue"] #omg-github svg {
  fill: white; /* like the theme toggle icons on the blue background */
}
#omg-github:hover,
#omg-github:focus-visible {
  opacity: 1;
}

/* ---------------------------------------------------------------- garden */

.content {
  max-width: 980px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0 0 6px;
}
.tools,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.toolbar button {
  margin: 0;
}
.tools button {
  opacity: 0.7;
}
.tools button.active {
  opacity: 1;
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
.tines select {
  font: inherit;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--input-text);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
}
.tool-hint {
  margin: 4px 0 10px;
  font-size: 0.9em;
  opacity: 0.8;
  min-height: 1.4em;
}
.garden {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 600;
  border-radius: 6px;
  overflow: hidden;
  touch-action: none; /* raking with a finger must not scroll the page */
  box-shadow: 0 0 0 6px #6d5a41, 0 0 0 8px #4a3c2a, 0 10px 30px rgba(0, 0, 0, 0.4); /* a wooden frame */
  margin: 14px 8px 24px;
  width: calc(100% - 16px);
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}
.garden[data-tool="stone"] {
  cursor: pointer;
}
.garden canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.rake-cursor {
  position: absolute;
  display: none;
  border-radius: 50%;
  border: 1.5px solid rgba(80, 60, 30, 0.5);
  pointer-events: none;
}
.explain p {
  max-width: 680px;
  line-height: 1.55;
}
.footer {
  margin-top: 40px;
}
html[data-theme="light"] .toolbar button.secondary {
  color: #1a212d;
}
@media only screen and (max-width: 560px) {
  .garden {
    aspect-ratio: 960 / 600;
  }
  .toolbar {
    gap: 8px 12px;
  }
}

/* keep the title clear of the theme toggle and GitHub icon on phones */
@media only screen and (max-width: 560px) {
  #omg-header h1 {
    padding-right: 96px;
    font-size: min(2em, 6.2vw);
  }
  #omg-header + h2 {
    padding-right: 40px;
  }
}
