/* ---------------------------------------------------------------------------
 * The wallpaper tool, over the shared chrome in site.css. The page has no
 * color of its own on purpose — every hue on it belongs to the blobs in the
 * sheet, which is the thing being made and so the only thing that should be
 * bright. The sheet wants room, so the wrap runs a little wider here.
 * ------------------------------------------------------------------------- */

.wrap {
  max-width: 1240px;
  padding: 0 clamp(16px, 4vw, 40px);
}

.caps {
  margin: 0;
}

/* --- masthead ------------------------------------------------------ */
.head {
  padding: clamp(26px, 5vh, 48px) 0 clamp(20px, 3vh, 30px);
  max-width: 46em;
}

h1 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.lede {
  margin: 14px 0 0;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 16.5px;
}

/* --- the tool ------------------------------------------------------ */
.tool {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
  padding-bottom: 44px;
}

@media (max-width: 900px) {
  .tool {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: rgba(252, 252, 250, 0.86);
  backdrop-filter: blur(6px);
}

@media (max-width: 900px) {
  .panel {
    position: static;
  }

  /* Stacked, the sheet comes first: a visitor should land on the thing
     being made, and scroll to the knobs that change it. */
  .stage {
    order: -1;
  }
}

.panel fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.panel legend {
  padding: 0 0 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field {
  display: grid;
  gap: 5px;
}

.field > .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.field label {
  font-size: 13px;
}

.field output {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-soft);
}

select,
input[type="text"] {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 13.5px;
}

input[type="text"] {
  font-variant-numeric: tabular-nums;
}

select:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--ink);
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.check input {
  margin: 0;
  accent-color: var(--ink);
}

.hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.acts {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--hair-soft);
}

button {
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button.ghost {
  background: none;
  border-color: var(--hair);
  color: var(--ink);
  font-weight: 500;
}

button.ghost:hover {
  border-color: var(--ink);
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.shuffle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shuffle-row button {
  flex: 1;
}

#seed {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* --- the sheet ------------------------------------------------------ */
.stage {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sheet {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: rgba(35, 39, 47, 0.028);
}

#out {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 74vh;
  box-shadow: 0 18px 50px -30px rgba(20, 24, 32, 0.55);
  /* A checkerboard behind the sheet itself, so a transparent one reads as
     transparent rather than as whatever the page happens to be. Any
     opaque ground covers it completely. */
  background-color: #fff;
  background-image:
    linear-gradient(45deg, var(--hair-soft) 25%, transparent 25% 75%, var(--hair-soft) 75%),
    linear-gradient(45deg, var(--hair-soft) 25%, transparent 25% 75%, var(--hair-soft) 75%);
  background-size: 18px 18px;
  background-position:
    0 0,
    9px 9px;
}

#status {
  margin: 0;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
