main { display: grid; grid-template-columns: minmax(290px, 370px) minmax(0, 1fr); }
.content { min-width: 0; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(20px, 5vw, 70px);
  background:
    radial-gradient(circle at 50% 43%, #343b30 0, #20241e 42%, var(--paper) 75%);
}

.canvas-shell {
  position: relative;
  width: min(100%, calc(100vh - 150px));
  min-width: 260px;
  aspect-ratio: 1;
  overflow: hidden;
  background: #eee9df;
  box-shadow: 0 24px 80px #0009, 0 0 0 1px #ffffff18;
}

canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
canvas.dragging { cursor: grabbing; }

.drag-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 7px 9px;
  border-radius: 4px;
  background: #111b;
  color: #f5f0e5;
  font: .66rem var(--mono);
  pointer-events: none;
  transition: opacity 180ms ease;
}

.canvas-shell:hover .drag-hint { opacity: .45; }

.render-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--muted);
  font: .74rem var(--mono);
}

.render-status.warning { color: var(--warning); }

.info-button {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 12px;
  border-color: #ffffff30;
  background: #111c;
  backdrop-filter: blur(8px);
  font-size: .8rem;
}

.info-button span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 700 .7rem Georgia, serif;
}

.info-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #ffffff2b;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 120px #000d;
}

.info-dialog::backdrop {
  background: #080a08d9;
  backdrop-filter: blur(8px);
}

.info-close {
  position: sticky;
  top: 14px;
  z-index: 2;
  float: right;
  min-height: 36px;
  margin: 14px 14px -50px 0;
  padding: 7px 11px;
  background: #111e;
}

.explainer,
.attribution { padding: clamp(38px, 6vw, 68px) clamp(24px, 7vw, 76px); }

.explainer { background: #ece7db; color: #20231e; }
.explainer .step { color: #4c670a; }
.explainer h2 { max-width: 680px; }

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 34px 0;
  background: #b8b4a9;
  border: 1px solid #b8b4a9;
}

.explanation-grid article { padding: clamp(20px, 3vw, 32px); background: #f6f2e9; }
.explanation-grid article > span { display: block; margin-bottom: 35px; color: #627b1b; font: 700 .78rem var(--mono); }
.explanation-grid p { margin: 0; color: #5f635b; }

.term-note,
.fabrication-note { max-width: 780px; }
.fabrication-note { margin-bottom: 0; color: #4b5148; }

.attribution { clear: both; border-top: 1px solid var(--line); }
.attribution > p:not(.step) { max-width: 760px; color: var(--muted); }
.attribution h2 { max-width: 720px; }

.source-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.source-links a { padding: 10px 13px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.source-links a:hover { border-color: var(--accent); }
