:root {
  color-scheme: dark;
  --paper: #f4efe4;
  --ink: #171614;
  --charcoal: #161918;
  --moss: #52664d;
  --teal: #225b62;
  --ochre: #c88a32;
  --rose: #a24954;
  --line: rgba(244, 239, 228, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background:
    linear-gradient(120deg, rgba(34, 91, 98, 0.42), transparent 42%),
    radial-gradient(circle at 80% 18%, rgba(200, 138, 50, 0.28), transparent 26%),
    #111312;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: rgba(17, 19, 18, 0.76);
  border-right: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: #cdbb94;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  font-weight: 720;
}

h1 {
  max-width: 10em;
  font-size: clamp(32px, 5vw, 54px);
}

h2 {
  font-size: clamp(24px, 3.2vw, 42px);
}

.panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 239, 228, 0.055);
}

.panel-title {
  margin-bottom: 10px;
  color: #dfd1b0;
  font-size: 13px;
}

.file-box {
  display: block;
  padding: 12px;
  border: 1px dashed rgba(244, 239, 228, 0.28);
  border-radius: 7px;
  color: #f3e4be;
}

.file-box + .file-box {
  margin-top: 10px;
}

.file-box span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

input,
select,
button {
  width: 100%;
  color: inherit;
  font: inherit;
}

input[type="file"]::file-selector-button,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}

.compact {
  display: grid;
  gap: 14px;
  color: #d6ccb9;
  font-size: 13px;
}

.recipe-list {
  display: grid;
  gap: 8px;
}

.recipe {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(244, 239, 228, 0.08);
  text-align: left;
  cursor: pointer;
}

.recipe.active {
  border-color: rgba(200, 138, 50, 0.8);
  background: rgba(200, 138, 50, 0.18);
}

.primary {
  margin-top: auto;
  border: 0;
  border-radius: 7px;
  padding: 13px 16px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 28px;
}

.stage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 52%;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(244, 239, 228, 0.08);
  color: #ead9b2;
  font-size: 12px;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-height: 0;
}

figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090a09;
}

figcaption {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(10, 10, 9, 0.68);
  color: #fff3d6;
  font-size: 12px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.notes > div {
  min-height: 108px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.notes span {
  color: #cdbb94;
  font-size: 12px;
}

.notes p {
  margin: 8px 0 0;
  color: #f1eadb;
  line-height: 1.55;
  font-size: 14px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .compare,
  .notes {
    grid-template-columns: 1fr;
  }

  .stage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tags {
    justify-content: flex-start;
    max-width: none;
  }
}
