:root {
  --color-ink: #0c0d10;
  --color-paper: #f3efe4;
  --color-cream: #f7f4ec;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }

  html,
  body {
    height: 100%;
    margin: 0;
    background: var(--color-ink);
    color: var(--color-cream);
  }

.lot-root {
  --fg: #f4f1ea;
  --fg-dim: rgba(244, 241, 234, 0.62);
  --line: rgba(244, 241, 234, 0.16);
  --ink: #161513;
  --paper: #f3efe4;
  --paper-dim: #6f6a60;
  --rule: rgba(22, 21, 19, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--color-ink);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

.lot-root button {
  font: inherit;
  color: inherit;
}

.lot-root :focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.work {
  position: absolute;
  inset: 0;
  display: flex;
  min-height: 0;
}

#stage {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--color-ink);
  overflow: hidden;
}

#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  touch-action: none;
  cursor: grab;
  transition: opacity 700ms var(--ease);
}

#stage.is-ready #gl {
  opacity: 1;
}

#gl.is-drag {
  cursor: grabbing;
}

#gl.is-hot {
  cursor: pointer;
}

#stage.no-gl {
  background-size: cover;
  background-position: center;
}

#stage.no-gl #gl,
#stage.no-gl #labels,
#stage.no-gl .zoom {
  display: none;
}

#labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bar {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 22px 36px;
  background: linear-gradient(to bottom, rgba(12, 13, 16, 0.72), rgba(12, 13, 16, 0));
  pointer-events: none;
}

.bar .brand,
.bar .nav,
.bar .tools {
  pointer-events: auto;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 54px;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.brand span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.nav {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav button {
  background: none;
  border: 0;
  padding: 10px 12px;
  color: var(--fg-dim);
  font-size: 23.4px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 transparent;
  transition: color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.nav button:hover {
  color: var(--fg);
}

.nav button[aria-current="true"] {
  color: var(--fg);
  box-shadow: inset 0 -1px 0 var(--fg);
}

.tools {
  display: flex;
  gap: 8px;
  flex: none;
}

.toggle {
  min-height: 36px;
  padding: 0 12px;
  background: rgba(12, 13, 16, 0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 150ms var(--ease), border-color 150ms var(--ease), background 150ms var(--ease);
}

.toggle:hover {
  color: var(--fg);
  border-color: rgba(244, 241, 234, 0.4);
}

.toggle[aria-pressed="true"] {
  color: var(--ink);
  background: var(--fg);
  border-color: var(--fg);
}

.chip {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(12, 13, 16, 0.88);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 400ms var(--ease);
}

#labels.is-intro .chip,
.chip.is-on,
.chip.is-hot {
  opacity: 1;
}

.zoom {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zoom button {
  width: 44px;
  height: 44px;
  background: rgba(12, 13, 16, 0.82);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}

.zoom button:hover {
  border-color: rgba(244, 241, 234, 0.45);
}

.hint,
.toast {
  position: absolute;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  background: rgba(12, 13, 16, 0.82);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hint {
  bottom: 22px;
  pointer-events: none;
  transition: opacity 400ms var(--ease);
}

.hint.is-gone {
  opacity: 0;
}

.toast {
  top: 78px;
  max-width: min(440px, 86%);
  text-align: center;
  white-space: normal;
}

.callsheet {
  position: absolute;
  left: 18px;
  top: 122px;
  z-index: 5;
  font-size: 13px;
}

.callsheet > button,
#sheetBox button {
  background: rgba(12, 13, 16, 0.82);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#sheetBox {
  margin-top: 8px;
  width: 220px;
  background: rgba(12, 13, 16, 0.92);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 10px;
}

#sheetBox ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

#sheetBox li {
  padding: 5px 2px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 13px;
}

#sheetBox li.is-done {
  color: var(--fg);
}

#sheetBox button {
  border-radius: 999px;
  padding: 6px 10px;
  letter-spacing: 0.06em;
}

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  margin-left: -5px;
  border: 5px solid transparent;
  border-bottom: 0;
  border-top-color: var(--paper);
}

.bubble.is-call {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.debug {
  position: absolute;
  right: 18px;
  bottom: 120px;
  z-index: 6;
  width: 230px;
  background: rgba(12, 13, 16, 0.92);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 12px;
}

.debug p {
  margin: 0 0 6px;
}

.debug textarea {
  width: 100%;
  height: 92px;
  background: #101114;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace;
  resize: vertical;
}

.debug button {
  margin-top: 6px;
  margin-right: 6px;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}
.node-tag {
  position: absolute;
  left: 0;
  top: 0;
  font: 10px/1 ui-monospace, Menlo, Consolas, monospace;
  color: #071014;
  background: #49d6ea;
  border-radius: 99px;
  padding: 2px 4px;
  pointer-events: none;
}


#veil {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: var(--color-ink);
  transition: opacity 700ms var(--ease);
}

#veil.is-gone {
  opacity: 0;
  pointer-events: none;
}

.veil-copy {
  text-align: center;
}

.veil-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.veil-mark {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--paper);
}

.veil-wait {
  margin: 22px 0 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.veil-track {
  width: min(220px, 52vw);
  height: 2px;
  margin: 12px auto 0;
  background: rgba(244, 241, 234, 0.16);
  overflow: hidden;
}

#veilBar {
  height: 100%;
  width: 100%;
  transform: scaleX(0.04);
  transform-origin: left center;
  background: var(--fg);
  animation: veil-load 9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes veil-load {
  to { transform: scaleX(0.9); }
}

#panel {
  flex: none;
  width: min(400px, 38%);
  background: var(--paper);
  color: var(--ink);
  border-left: 1px solid var(--rule);
  overflow-y: auto;
  padding: 28px 28px 36px;
  opacity: 0;
  transform: translateX(16px);
}

#panel.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.sheet-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(32px, 3vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1;
}

.close {
  flex: none;
  min-height: 36px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

#panel p {
  margin: 0 0 14px;
  max-width: 62ch;
}

#panel h3 {
  margin: 22px 0 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#panel h3:first-child {
  margin-top: 0;
}

#panel .tags {
  margin: -6px 0 4px;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.03em;
}

#panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#panel li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

#panel li span:first-child {
  flex: 1;
  min-width: 0;
}

#panel li span:last-child {
  flex: none;
  color: var(--paper-dim);
  text-align: right;
}

.frame {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.frame.is-player {
  padding: 0;
  overflow: hidden;
}

.frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.todo {
  color: var(--paper-dim);
  font-size: 14px;
  border-left: 1px solid var(--ink);
  padding-left: 12px;
}

  color: var(--paper-dim);
  font-size: 14px;
  border-left: 1px solid var(--ink);
  padding-left: 12px;
}

.contact-links {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.contact-links a:hover {
  background: #2a2824;
}


[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .bar {
    gap: 10px;
    padding: 12px 14px 28px;
    flex-wrap: wrap;
  }

  .brand {
    font-size: 39.6px;
  }

  .nav {
    order: 3;
    flex-basis: 100%;
  }

  .nav button {
    padding: 8px 8px;
    font-size: 21.6px;
  }

  .work {
    flex-direction: column;
  }

  #panel {
    width: auto;
    max-height: 46%;
    border-left: 0;
    border-top: 1px solid var(--rule);
    border-radius: 18px 18px 0 0;
    padding: 18px 18px 24px;
  }

  .sheet-head h2 {
    font-size: 30px;
  }

  .callsheet {
    top: 168px;
    left: 12px;
  }

  .hint {
    max-width: 88%;
    white-space: normal;
    text-align: center;
  }

  .toast {
    top: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gl,
  #veil,
  #panel,
  .chip,
  .hint,
  .nav button,
  .toggle {
    transition: none;
  }
}
