*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0c0c0c;
}

#sn-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #0c0c0c;
}

#sn-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#sn-hint {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
}

#sn-ui {
  position: absolute;
  bottom: 46px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 10;
}

#sn-input-wrap {
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}

#sn-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(150, 150, 150, 0.3);
  color: inherit;
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 0.06em;
  padding: 3px 4px;
  width: 150px;
  outline: none;
  text-align: right;
}

#sn-input::placeholder {
  opacity: 0.35;
}

.sn-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#sn-reset {
  display: none;
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.4;
  cursor: pointer;
  user-select: none;
}

#sn-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: monospace;
  font-size: 20px;
  opacity: 0.4;
  cursor: pointer;
  line-height: 1;
  color: inherit;
}

#sn-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 16px 8px;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(160, 160, 160, 0.35);
  pointer-events: none;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#sn-footer a {
  color: rgba(160, 160, 160, 0.35);
  text-decoration: none;
  border-bottom: 1px solid rgba(160, 160, 160, 0.2);
  pointer-events: auto;
  transition: opacity 0.3s;
}

#sn-footer a:hover {
  opacity: 0.6;
}

#sn-home {
  position: absolute;
  left: 16px;
  bottom: 8px;
  border-bottom: none;
}
