html, body {
  margin: 0;
  padding: 0;
  background: #050505;
  overflow: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #ff8a3d;
  color: #050505;
}

a {
  color: #e8e2d9;
  text-decoration: none;
}

a:hover {
  color: #ffffff;
}

.wrap {
  position: fixed;
  inset: 0;
  background: #050505;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.layer {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: 13px;
  letter-spacing: 0;
  white-space: pre;
  user-select: none;
  pointer-events: none;
}

.layer.fire {
  color: transparent;
  background-image: linear-gradient(to top, #ffd9a0 0%, #ff8a3d 26%, #d64a1a 52%, #6e2410 76%, #2a1008 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.layer.text {
  color: #f4efe7;
  text-shadow: 0 0 12px rgba(255, 140, 60, 0.35);
}

.link-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.link-layer a {
  position: absolute;
  display: block;
  pointer-events: auto;
  cursor: pointer;
}

.link-layer a:hover {
  border-bottom: 1px solid rgba(244, 239, 231, 0.45);
}

.wordmark {
  position: absolute;
  top: 22px;
  left: 26px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8177;
}

.nav-shell {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 26px 26px 24px;
  background: linear-gradient(to top, #050505 0%, #050505 48%, rgba(5, 5, 5, 0) 100%);
}

#nav {
  display: flex;
  gap: 26px;
  align-items: baseline;
  font-size: 13px;
  letter-spacing: 0.06em;
}

#nav a {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: baseline;
  color: #c9c2b8;
  padding: 4px 0;
  touch-action: manipulation;
}

#nav a::before {
  content: '';
  position: absolute;
  inset: -14px -6px;
}

#nav a:hover {
  color: #ffffff;
}

#nav .marker {
  width: 7px;
  display: inline-block;
  color: #ff8a3d;
}

.close-btn {
  position: absolute;
  display: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  color: #8a8177;
  cursor: pointer;
  pointer-events: auto;
}

.close-btn::before {
  content: '';
  position: absolute;
  inset: -14px;
}

.close-btn:hover {
  color: #ffffff;
}

.settings-toggle {
  position: absolute;
  bottom: 26px;
  right: 26px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #4e4842;
  cursor: pointer;
  padding: 4px;
  margin: -4px;
}

.settings-toggle::before {
  content: '';
  position: absolute;
  inset: -10px;
}

.settings-toggle:hover,
.settings-toggle.active {
  color: #8a8177;
}

.settings-panel {
  position: absolute;
  bottom: 56px;
  right: 26px;
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #0a0908;
  border: 1px solid #1c1815;
  padding: 14px 16px;
  font-size: 12px;
  color: #c9c2b8;
}

.settings-panel[hidden] {
  display: none;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8177;
}

.settings-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-options button {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: #c9c2b8;
  cursor: pointer;
  padding: 3px 0;
  text-align: left;
}

.settings-options button::before {
  content: '';
  position: absolute;
  inset: -3px -6px;
}

.settings-options button:hover {
  color: #ffffff;
}

.settings-options .opt-marker {
  width: 7px;
  display: inline-block;
  color: #ff8a3d;
}

.settings-stepper {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.settings-stepper button {
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  color: #c9c2b8;
  cursor: pointer;
  padding: 2px 4px;
}

.settings-stepper button::before {
  content: '';
  position: absolute;
  inset: -10px;
}

.settings-stepper button:hover:not(:disabled) {
  color: #ffffff;
}

.settings-stepper button:disabled {
  color: #332e29;
  cursor: default;
}

#intensity-value {
  min-width: 3.5ch;
  text-align: center;
  color: #f4efe7;
}

@media (max-width: 480px) {
  .layer {
    font-size: 11px;
    line-height: 11px;
  }

  .wordmark {
    top: 16px;
    left: 16px;
    font-size: 11px;
  }

  .nav-shell {
    padding: 18px 16px 20px;
  }

  #nav {
    gap: 18px;
    font-size: 12px;
  }

  .settings-toggle {
    bottom: 16px;
    right: 16px;
    font-size: 10px;
  }

  .settings-panel {
    bottom: 44px;
    right: 16px;
    width: 190px;
  }
}
