:root {
  color-scheme: dark;
  --ink: #eef6ee;
  --muted: #9fb0a5;
  --panel: rgba(14, 20, 18, .82);
  --line: rgba(238, 246, 238, .2);
  --button: #d7f574;
  --button-ink: #11170f;
  --danger: #ff8d7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #090d0c;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 100vh;
}

.sky {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  cursor: crosshair;
}

#loom {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  left: clamp(18px, 5vw, 72px);
  top: clamp(18px, 7vh, 72px);
  max-width: min(640px, 78vw);
  pointer-events: none;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .45);
}

.kicker,
.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 10px;
  font-size: clamp(56px, 12vw, 156px);
  line-height: .86;
  letter-spacing: 0;
}

.hud p:last-child {
  margin: 0;
  max-width: 36rem;
  color: rgba(238, 246, 238, .88);
  font-size: clamp(17px, 2.2vw, 26px);
  line-height: 1.25;
}

.panel {
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

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

.mark {
  width: 42px;
  aspect-ratio: 1;
  border: 2px solid var(--button);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 45%, rgba(215, 245, 116, .85) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(215, 245, 116, .85) 45% 55%, transparent 55%),
    radial-gradient(circle, rgba(215, 245, 116, .35), transparent 56%);
}

.brand strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.controls {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 9px;
  color: rgba(238, 246, 238, .84);
  font-weight: 750;
}

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

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 44px;
  gap: 10px;
}

button {
  min-height: 44px;
  border: 1px solid rgba(215, 245, 116, .36);
  border-radius: 7px;
  color: var(--button-ink);
  background: var(--button);
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

#clear {
  color: #220906;
  background: var(--danger);
  border-color: rgba(255, 141, 122, .44);
}

.pins {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 3px;
}

.pin {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .055);
}

.pin strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.pin span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sky {
    min-height: 64vh;
  }

  .panel {
    min-height: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
