:root {
  --bg: #ffffff;
  --ink: #17191b;
  --muted: #5b5f66;
  --purple: #902bf5;
  --lavender: #cf9fff;
  --pink: #ff6bd6;
  --soft: #f4ecff;
  --canvas-bg: #100422;
  --canvas-bg-deep: #050010;
  --rule: rgba(144, 43, 245, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Anonymous Pro', 'Menlo', monospace;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.masthead {
  padding: 36px 56px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 28px;
  flex-wrap: wrap;
}
.masthead h1 {
  font-family: 'Taviraj', Georgia, serif;
  font-weight: 400;
  font-size: 132px;
  line-height: 0.85;
  margin: 0;
  color: var(--ink);
  text-transform: lowercase;
  letter-spacing: -0.03em;
}
.masthead .tag {
  font-family: 'Amatic SC', 'Bradley Hand', cursive;
  font-size: 26px;
  color: var(--purple);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.garden {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 24px 56px 40px;
  min-height: calc(100vh - 200px);
}

.garden-frame {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(144, 43, 245, 0.35), transparent 60%),
    linear-gradient(180deg, var(--canvas-bg) 0%, var(--canvas-bg-deep) 100%);
  border-radius: 14px;
  overflow: hidden;
  min-height: 540px;
  box-shadow: 0 14px 40px -20px rgba(60, 0, 110, 0.45);
}
#canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#canvas:active { cursor: grabbing; }

.float-buttons {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.pill {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 22px;
  padding: 4px 18px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 140ms ease, color 140ms ease, transform 90ms ease, box-shadow 140ms ease;
  box-shadow: 0 2px 0 rgba(144, 43, 245, 0.35);
}
.pill:hover { background: var(--purple); color: #fff; }
.pill:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(144, 43, 245, 0.35); }

.float-hint {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  pointer-events: none;
}
.float-hint p {
  margin: 0;
  font-family: 'Amatic SC', cursive;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
}

.float-meta {
  position: absolute;
  bottom: 16px;
  left: 22px;
  z-index: 2;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.78);
}
.float-meta p { margin: 0; }
.meta-line {
  font-family: 'Anonymous Pro', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--lavender);
  text-transform: uppercase;
}
.meta-name {
  font-family: 'Taviraj', serif;
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  margin-top: 2px;
  color: #fff;
}
.meta-seed {
  margin-top: 4px;
  font-family: 'Anonymous Pro', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
}

.genome {
  background: var(--soft);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.genome-head { display: flex; flex-direction: column; gap: 8px; }
.genome-eyebrow {
  margin: 0;
  font-family: 'Anonymous Pro', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--purple);
}
.select {
  width: 100%;
  padding: 8px 12px;
  font-family: 'Taviraj', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--lavender);
  border-radius: 6px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%23902bf5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.row { display: flex; flex-direction: column; gap: 10px; }
.cell { display: flex; flex-direction: column; gap: 4px; }
.cell label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Anonymous Pro', monospace;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.cell output {
  font-family: 'Anonymous Pro', monospace;
  font-size: 11px;
  color: var(--purple);
  font-weight: 700;
}
.cell.flag { flex-direction: row; gap: 16px; align-items: center; }
.cell.flag label { font-family: 'Amatic SC', cursive; font-size: 22px; color: var(--purple); gap: 6px; justify-content: flex-start; }
.cell.flag input { accent-color: var(--purple); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
  height: 16px;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--lavender); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  background: var(--purple);
  border-radius: 50%;
  margin-top: -6px;
  cursor: pointer;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--purple);
}
input[type="range"]::-moz-range-track { height: 2px; background: var(--lavender); }
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--purple);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}

.exports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.stamp {
  padding: 8px 10px;
  font-family: 'Anonymous Pro', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--purple);
  background: transparent;
  border: 1px solid var(--purple);
  border-radius: 6px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.stamp:hover { background: var(--purple); color: #fff; }

.footnote {
  margin: 6px 0 0;
  font-family: 'Anonymous Pro', monospace;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .masthead { padding: 24px 28px 14px; gap: 18px; }
  .masthead h1 { font-size: 88px; }
  .masthead .tag { font-size: 22px; }
  .garden { padding: 16px 28px 28px; grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .garden-frame { min-height: 64vh; }
}
@media (max-width: 620px) {
  .masthead h1 { font-size: 64px; }
  .pill { font-size: 18px; padding: 3px 14px; }
  .meta-name { font-size: 22px; }
}
